Sleep
2 min readApr 25, 2024

PHow I got HackTheBox To Connect To The Internet and update PoC

It broke it when I did sudo restart

nano womp_womp.py

This is the script

begin script

import subprocess
print(“Made By ClumsyLulz”)
# List of system commands to execute
commands = [
“ls -l /etc/sudo.conf”,
“ls -l /usr/bin/sudo”,
“cat /etc/shadow”,
“cd ..; cd ..; ls -lra;”,
]

# Execute each command
for command in commands:
try:
# Open a process, and get the output and errors
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# Wait for the process to complete
output, errors = process.communicate()

# Decode the output and errors from bytes to string
output = output.decode(‘utf-8’)
errors = errors.decode(‘utf-8’)

if output:
print(output)
if errors:
print(“Error:”, errors)
except Exception as e:
print(“Failed to run command:”, str(e))
exit(1)

end script

https://app.hackthebox.com/machines/Usage is the one I tested this with
nmap -A 10.10.11.18 — script=all -p- -T5 -d
2606:4700:4400::ac40:911d
repos.insights.digitalocean.com
┌─[us-starting-point-1-dhcp]─[10.10.15.41]─[clumsylulz@htb-6rvvprtmul]─[/]
└──╼ [★]$ apt update
Reading package lists… Done
E: Could not open lock file /var/lib/apt/lists/lock — open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin — RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin — RemoveCaches (13: Permission denied)
┌─[us-starting-point-1-dhcp]─[10.10.15.41]─[clumsylulz@htb-6rvvprtmul]─[/]
└──╼ [★]$
tar -xzvf opencl_runtime_16.1.2_x64_rh_6.4.0.37.tgz
less intel.pset.root.htb_6rvvprtmul_04.20.04.55.53.2024.log
cat intel.pset.root.htb_6rvvprtmul_04.20.04.55.53.2024.log
cat /etc/apt/sources.list
ls /etc/apt/sources.list.d/
ls /etc/apt/sources.list.d/
nc -lvp 1234
python3 -m http.server 8000
http://0.0.0.0:8000/
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt-get install -f
sudo tee /etc/yum.repos.d/google-chrome.repo <<EOF
[google-chrome]
name=google-chrome — \$basearch
baseurl=http://dl.google.com/linux/chrome/rpm/stable/\$basearch
enabled=1
gpgcheck=1
gpgkey=https://dl.google.com/linux/linux_signing_key.pub
EOF
sudo dnf install google-chrome-stable
sudo yum install google-chrome-stable
142.250.72.110
{“cpes”:[],”hostnames”:[“lga34s32-in-f14.1e100.net”],”ip”:”142.250.72.110",”ports”:[80,443],”tags”:[“self-signed”],”vulns”:[]}
sudo chown root:root /etc /lib /usr/sbin /usr
sudo chmod 755 /etc /lib /usr/sbin /usr
curl -I http://repos.insights.digitalocean.com/ubuntu/
echo “nameserver 8.8.8.8” | sudo tee /etc/resolv.conf > /dev/null
echo “nameserver 8.8.4.4” | sudo tee -a /etc/resolv.conf > /dev/null
ping -c 4 google.com
echo ‘Acquire::ForceIPv4 “true”;’ | sudo tee /etc/apt/apt.conf.d/99force-ipv4

No responses yet