Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scope for padding Oracle Vulnerability #298

Closed
wants to merge 10 commits into from

Conversation

amanjiofficial
Copy link

Corresponding changes in 'tanner.utils.patterns.py' is to be made and 'tanner.emulators.pad_oracle.py' is to be changed accordingly.

@@ -29,7 +29,8 @@ def __init__(self, redis_client):
'lfi': 0,
'xss': 0,
'rfi': 0,
'cmd_exec': 0}
'cmd_exec': 0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing ,


def scan(self, value):
detection = None
if patterns.PAD_ORACLE_ATTACK.match(value):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PAD_ORACLE_ATTACK pattern is missing

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will update the pattern.

detection = dict(name='pad_oracle', order=2)
return detection

def get_pad_oracle_results(self, attack_params):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of returning the same input params as header?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

attack_params is a dictionary with many iterations whereas header is returning only the first iteration

@afeena
Copy link
Collaborator

afeena commented Mar 25, 2019

@amanjiofficial before we can proceed with your pr, please complete the functionality :)

@amanjiofficial
Copy link
Author

@afeena pls check that is this the right way to implement this functionality?

@coveralls
Copy link

Pull Request Test Coverage Report for Build 841

  • 14 of 18 (77.78%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.6%) to 56.288%

Changes Missing Coverage Covered Lines Changed/Added Lines %
tanner/emulators/pad_oracle.py 9 13 69.23%
Totals Coverage Status
Change from base Build 822: 0.6%
Covered Lines: 931
Relevant Lines: 1654

💛 - Coveralls

@afeena
Copy link
Collaborator

afeena commented Mar 28, 2019

@amanjiofficial you can use some tools to check your regular expression
https://www.owasp.org/index.php/Testing_for_Padding_Oracle_(OTG-CRYPST-002)

@amanjiofficial
Copy link
Author

@afeena I guess the commit is okay to be merged. Please suggest if I should make any changes.

@@ -18,7 +18,7 @@
'REDIS': {'host': 'tanner_redis', 'port': 6379, 'poolsize': 80, 'timeout': 1},
'EMULATORS': {'root_dir': '/tmp/tanner/emulators'},
'EMULATOR_ENABLED': {'sqli': True, 'rfi': True, 'lfi': False, 'xss': True, 'cmd_exec': False,
'php_code_injection': True, "crlf": True},
'php_code_injection': True, "crlf": True "pad_oracle": True},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'php_code_injection': True, "crlf": True "pad_oracle": True},
'php_code_injection': True, "crlf": True, "pad_oracle": True},

@@ -15,3 +15,4 @@
WORD_PRESS_CONTENT = re.compile(r'/wp-content/.*')
HTML_TAGS = re.compile(r'.*<(.*)>.*')
QUERY = re.compile(r'.*\?.*=')
PAD_ORACLE_ATTACK = re.compile(r'.*<(.|\r\n)*?>')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand how are you trying to implement it.

@afeena
Copy link
Collaborator

afeena commented Apr 10, 2019

@amanjiofficial please, if you want to get more guidance, explain you idea and code in more details :)

@glaslos
Copy link
Member

glaslos commented Jun 1, 2019

Closing this due to inactivity and unresolved issues. Feel free to open a new PR with changes made according to the conversation here.

@glaslos glaslos closed this Jun 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants