Skip to content

Commit

Permalink
Bug fix: false positive in tnspoison
Browse files Browse the repository at this point in the history
  • Loading branch information
quentinhardy committed May 2, 2018
1 parent f50c618 commit 6a80c1c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Tnspoison.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,16 +310,17 @@ def exploitTNSPoisoningAttack (self, checkOnly=False):
Returns -1 if an error occured with the TNS command
Returns True if no problem
'''
ERROR_STR = "(ERROR_STACK=(ERROR="
ERROR_STR = ["(ERROR_STACK=(ERROR=","(DESCRIPTION=(ERR="]
logging.info("Checking if the target is vulnerable to TNS poisoning attack...")
status = self.getInformation(cmd='service_register_NSGR')
if status == False:
logging.debug("Error unknow with the TNS command sent")
return -1
else:
if ERROR_STR in self.recvdata:
logging.debug("'{0}' in target's response after registration command: not vulnerable".format(ERROR_STR))
return False
for anError in ERROR_STR:
if anError in self.recvdata:
logging.debug("'{0}' in target's response after registration command: not vulnerable".format(ERROR_STR))
return False
else:
logging.debug("Target is vulnerable to CVE-2012-1675 because there is no error in the reponse after registration command")
if checkOnly == True:
Expand Down

0 comments on commit 6a80c1c

Please sign in to comment.