mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-05 12:36:09 -07:00
optimized oracle module and user not existing messages
This commit is contained in:
parent
7110837cf8
commit
2b02aa091b
6 changed files with 19 additions and 6 deletions
|
@ -69,7 +69,7 @@ int start_cvs(int s, char *ip, int port, unsigned char options, char *miscptr, F
|
|||
}
|
||||
} else if (strstr(buf, "no such user") || strstr(buf, "E PAM start error: Critical error - immediate abort\n")) {
|
||||
if (verbose) {
|
||||
hydra_report(stderr, "[VERBOSE] User %s does not exist\n", login);
|
||||
hydra_report(stderr, "[INFO] User %s does not exist, skipping\n", login);
|
||||
}
|
||||
hydra_completed_pair_skip();
|
||||
free(buf);
|
||||
|
|
|
@ -22,6 +22,8 @@ int start_ftp(int s, char *ip, int port, unsigned char options, char *miscptr, F
|
|||
return 1;
|
||||
/* special hack to identify 530 user unknown msg. suggested by Jean-Baptiste.BEAUFRETON@turbomeca.fr */
|
||||
if (buf[0] == '5' && buf[1] == '3' && buf[2] == '0') {
|
||||
if (verbose)
|
||||
printf("[INFO] user %s does not exist, skipping\n", login);
|
||||
hydra_completed_pair_skip();
|
||||
if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
|
||||
return 4;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
/*
|
||||
|
||||
david: code is based on SNORT spo_database.c
|
||||
|
@ -95,9 +94,15 @@ int start_oracle(int s, char *ip, int port, unsigned char options, char *miscptr
|
|||
}
|
||||
if (strstr((const char *) o_errormsg, "ORA-12514") != NULL) {
|
||||
hydra_report(stderr, "[ERROR] ORACLE SID is not valid, you should try to enumerate them.\n");
|
||||
hydra_completed_pair();
|
||||
return 3;
|
||||
}
|
||||
if (strstr((const char *) o_errormsg, "ORA-28000") != NULL) {
|
||||
hydra_report(stderr, "[ERROR] ORACLE account %s is locked.\n", login);
|
||||
hydra_report(stderr, "[INFO] ORACLE account %s is locked.\n", login);
|
||||
hydra_completed_pair_skip();
|
||||
if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
|
||||
return 3;
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (o_error) {
|
||||
|
@ -110,8 +115,9 @@ int start_oracle(int s, char *ip, int port, unsigned char options, char *miscptr
|
|||
//set these parameters to not generate the file
|
||||
//LOG_DIRECTORY_CLIENT = /dev/null
|
||||
//LOG_FILE_CLIENT = /dev/null
|
||||
unlink("sqlnet.log");
|
||||
|
||||
if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
|
||||
return 3;
|
||||
return 2;
|
||||
} else {
|
||||
OCILogoff(o_servicecontext, o_error);
|
||||
|
@ -164,6 +170,7 @@ void service_oracle(char *ip, int sp, unsigned char options, char *miscptr, FILE
|
|||
case 3: /* clean exit */
|
||||
if (sock >= 0)
|
||||
sock = hydra_disconnect(sock);
|
||||
unlink("sqlnet.log");
|
||||
hydra_child_exit(0);
|
||||
return;
|
||||
default:
|
||||
|
|
|
@ -397,6 +397,8 @@ int start_pop3(int s, char *ip, int port, unsigned char options, char *miscptr,
|
|||
}
|
||||
/* special AS/400 hack */
|
||||
if (strstr(buf, "CPF2204") != NULL || strstr(buf, "CPF22E3") != NULL || strstr(buf, "CPF22E4") != NULL || strstr(buf, "CPF22E5") != NULL) {
|
||||
if (verbose)
|
||||
printf("[INFO] user %s does not exist, skipping\n", login);
|
||||
hydra_completed_pair_skip();
|
||||
free(buf);
|
||||
if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
|
||||
|
|
|
@ -454,8 +454,8 @@ int start_snmp(int s, char *ip, int port, unsigned char options, char *miscptr,
|
|||
return 3;
|
||||
return 1;
|
||||
} else if ((buf[off + 15] & 5) == 4 && hydra_memsearch(buf, i, snmpv3_nouser, sizeof(snmpv3_nouser)) >= 0) { // user does not exist
|
||||
if (debug)
|
||||
printf("[DEBUG] server reply indicates login %s does not\n", login);
|
||||
if (verbose)
|
||||
printf("[INFO] user %s does not exist, skipping\n", login);
|
||||
hydra_completed_pair_skip();
|
||||
if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
|
||||
return 3;
|
||||
|
|
|
@ -118,6 +118,8 @@ int start_svn(int s, char *ip, int port, unsigned char options, char *miscptr, F
|
|||
return 4; //error
|
||||
} else {
|
||||
if (strstr(err->message, "Username not found")) {
|
||||
if (verbose)
|
||||
printf("[INFO] user %s does not exist, skipping\n", login);
|
||||
hydra_completed_pair_skip();
|
||||
if (memcmp(hydra_get_next_pair(), &HYDRA_EXIT, sizeof(HYDRA_EXIT)) == 0)
|
||||
return 3;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue