int RPORT,salir=0,threads=0;
int ip1[4],ip2[4];
CRITICAL_SECTION cs,css,csshell;
FILE *vuln;
char *givemeip(char *ip);
int infectado(int sock, char *ip, int port,int j);
EnterCriticalSection(&cs);
if (ip1[3]!=254)
ip1[3]++;
else{
ip1[2]++;
ip1[3]=1;
}
if (ip1[2]==255){
ip1[2]++; ip1[1]++;}
LeaveCriticalSection(&cs);
if (ip1[2]>ip2[2]) { return(NULL); }
if (ip1[2]==ip2[2])
if (ip1[3]>ip2[3]) { return(NULL); }
sprintf(ip,"%d.%d.%d.%d",ip1[0],ip1[1],ip1[2],ip1[3]);
if (ip1[3]==1) printf(" + %s\n",ip);
return(ip);
}
/******************************************************************************/
插件源码:
# This script was written by Javier Olascoaga <jolascoaga@sia.es>
# (C) SIA (http://www.sia.es)
#
# based on A. Tarasco <atarasco@sia.es> research.
# This script is releases under the GNU GPLv2 license.
#
# Fixes by Tenable:
# - Changed text of description and report.
# - Checked response and added another step in the
# initialization process to avoid false positives.
# - Fixed bug that caused an empty banner in the report.
desc["english"]= "
This script checks whether the remote host is running the Hacker
Defender backdoor.
Hacker Defender is a rootkit for Windows. Among other things, it hooks
itself into all open TCP ports on the system, listening for a
specially-crafted packet, and opening a backdoor on that port when
found. This backdoor can be used by malicious users to control the
affected host remotely.
for (i=0; i <= max_ports; i++) {
# check list port
if (get_port_state(list_ports[i]))
{
soc = open_sock_tcp (list_ports[i]);
if (soc)
{
for (j=0;j<3;j++) {
# nb: to understand this, look at the HandlerRoutine in
# bdcli100.dpr in the Hacker Defender source.
send (socket:soc, data: hx[j]);
data = recv (socket:soc, length:128);
if (data && strlen(data) == 1 && ord(data[0]) == 0xe0)
{
for (t=0; t<20; t++) {
send (socket:soc, data: raw_string(0xe1));
data = recv (socket:soc, length:1, timeout:1);
if (data && strlen(data) == 1 && ord(data[0]) == 0xe2)
{
desc = ereg_replace(
string:desc["english"],
pattern:"This script[^\.]+\.",
replace:string("The remote host is running the ", hx_banner[j], " backdoor.")
);
security_hole(data:desc, port:list_ports[i]);
exit (0);
}
}
}
}
close(soc);
}
}
}
The source code of the plugin above is subject to copyright restrictions. Please check the license of the plugin and/or ask its author for licensing details.