Solutions of NATAS 1-15

Hello Folks,

In this post, I will share with you the solutions of Natas challenges from one to fifteen. It is strongly recommended not to look at the solutions without cogitating.


Username and password have been already provided for Natas0.




Login the page with the credential natas0/natas0.

On Chrome Browser right-click and “View page source”

Password for natas1 is : gtVrDuiDfck831PqWsLEZy5gyDz1clto




Login the page with the credential that you got from the natas0.

In this challenge you can not do right-clicking, instead you should use F12 shortcut function key to open Web developer tools. And the select Elements tab.

Password for natas2 is : ZluruAthQk7Q2MqmDeTiUij2ZvWy2mBi





Login the page with the credential that you got from the natas1.

On Chrome Browser right-click and “View page source”

Actually it is not obvious, but we have a hint from the tag <img src=”files/pixel.png”>

Let’s make a request for the URL

You can see the file users.txt, which holds the number of users’ credentials.

Password for natas3 is : sJIJNW6ucpu6HPZ1ZAchaDtwd7oGrD14



For this challenge, we should have basic understanding of robots.txt which is a Robots Exclusion Protocol, which indicates whether certain user agents (web-crawling software) can or cannot crawl parts of a website. These crawl instructions are specified by “disallowing” or “allowing” the behavior of certain (or all) user agents. For more information here.


Login the page with the credential that you got from the natas2 and “View Page Source” on Google Chrome.


Let’s make request to URL

As it indicated in the introduction which tells the all user agents(all crawlers) not to access and index contents of the folder s3cr3t. If we make another request for the URL you will see users.txt

Password for natas4 is: Z9tkRkWmpt9Qr7XrR5jWRkgOU901swEZ



To solve this challenge you need to have basic understanding of  de-facto HTTP request headers. For this challenge, our solution is Referer header.


Referer is an HTTP header field that identifies the address of the webpage (i.e. the URI or IRI) that linked to the resource being requested. By checking the referrer, the new webpage can see where the request originated.(Wikipedia)

Password for natas5 is : iX6IOfmpN7AYOQGPwtn3fXpbaJVJcHfq



When we send a web request to web server via curl, Web server sends  a Set-Cookie header to the user agent. And with every request user agent will send back all previously stored cookies to the server with Cookie: header.


There is no clear answer of this challenge. I just guessed it and modify the Cookie by setting the Cookie: loggedin=1

Password for the natas6 is : aGoY4q2Dc6MgDq4oL4YtoKtyAg9PeHa1



When we check the source code. It compares the value of the $secret with the value of the input element. If both values are equal, password for natas7 will be printed.


The include statement includes and evaluates the specified file.(php Manual).  Let’s try to access the include/ file by making a web request. URL

As you see value of $secret variable is FOEIUWGHFEEUHOFUOIU. if you put this value to input form and submit the form.



Password for natas7 is: 7z3hEENjQtflzgnT29q7wAvMNfZdh0i9




Web pages are rendered by the value of $_REQUEST[‘page’]. As an example . (To render about page.)

What if we set the page value to/etc/natas_webpass/natas8 ? So our URL will be




Password for natas8 is: DBfUBfqQG69KvJvJ1iAbMoIpwSNQ9bWe



We need to simple reverse engineering to solve this challenge. Key thing is the function encodeSecret()

We must put a value into the input form that function yields us the value 3d3d516343746d4d6d6c315669563362



You can use the URL  for your php sandbox.


If you put the value oubWYf2kBq into the input secret you will get the password for natas9.


Password for natas9 is: W0mMhUcRRnG8dcghE4qvk3JA9lGt8nDl




Running multiple commands by separating semicolon(;).

Password for natas10 is: nOpp1igQAkUzaI1GUUjzn1bFVj7xCNzu




If you check the snipped of code above some of the special characters checked by the preg_match() php funtion. We need to bypass this check somehow.

Solution1: .* cat /etc/natas_webpass/natas11

Solution2: Using the URL Encoding code to escaping the preg_match() function.

Password for natas11 is: U82q5TCMMQ9xuFoI3dYX61s7OZD9JKoK




Solution: Logic of XOR Encryption

If you check the source code and the server responses, you realize that  you know the cipher and plain text, so we can extract the xor_encryption key for this challenge.

Plain Text  XOR Key = Cipher Text

Cipher Text XOR Plain Text = Key

cipher is: ClVLIh4ASCsCBE8lAxMacFMZV2hdVVotEhhUJQNVAmhSEV4sFxFeaAw


Let’s use  {“showpassword”:”no”,”bgcolor”:”#ffffff”} as our key.



Key is: qw8J


Encrypted cookie for showing password is:




Password for natas12 is: EDXp0pS26wLKHZy1rDBPUZk0RKfLGIR3



1- Install exiftool.

2- Create a very small jpg image which is less than 1KiB and name it white.jpg (small white background is enough)

3- Next step is injecting malicious php code inside the white.jpg by using exiftool.



4- Open the browser and make web request to

5- Open browser’s “Developer tools.” and the remove the type=”hidden” tag

6- And modify the suffix from jpg to php.

7- Click the link of the uploaded file. it will be interpret by the php.




Password for natas13 is: jmLTY0qiPZBbaKc9341cqPQZBJv7MQbY



You can use the same method as we did on natas12. Only thing you have to do is changing the file.



Password for natas14 is: Lg96M10TdfaPyVBkJdjymbllQ5L6qdl1





username > ” or “1”=”1

password > ” or “1”=”1


Password for natas15 is: AwWj0w5cvxrZiONgZ9J5stNVkmxdk39J



My first guess to solve this challenge was the into outfile statement. Unluckily, I do not have permission to create a file. For more information check secure_file_priv option of mysql server.


select * from users where username=”natas16″ into outfile “/var/www/html”

After three days of trying other methods. I stuck on this challenge. So, I had to get some hint. Hint was the “Blind Sql Injection”. After red over some pages in the blogs, I understand the logic and create my own solution to find the password. Basically script does brute-force by trying all the alphabets(uppercase, lowercase) and numbers.




Password for natas16 is: WaIHEacj63wnNIBROHeqi3p9t0m5nhmh