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

Snare tanner communication #184

Merged
merged 4 commits into from Aug 16, 2017
Merged

Conversation

rnehra01
Copy link
Collaborator

fix #100
This is how return value from tanner look like :

Case 1 (where you need to return the page normally)
detection = {
		type : 1
        }
Case 2 (inject payload in the page)
detection = {
		type : 2,
payload = {
		page : ‘/vuln.php’,
		value : ‘<script>alert(1)</script>’
		headers : {
				new_header : ‘new_header_value’
			     }
	      }
        }
Case 3 (where input cause some error so return related to the type of error produced 
  e.g if input takes more time than expected then return 50X) 
detection = {
		type : 3,
                payload = {
		                  status_code : 500/504
                                 } 
       }

To make communication more systematic, return value type from each emulator is fixed i.e dict(value='', page=True/False) (if page=False then payload won't be injected on any page but on a new page)

if 'payload' not in detection:
detection['type'] = 1
elif 'payload' in detection:
if 'status_code' not in detection:
Copy link
Collaborator

@afeena afeena Aug 12, 2017

Choose a reason for hiding this comment

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

As I understood from code, status_code in detection['payload'], am I right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, you're right.

injectable_page = '/index.html'
detection['payload']['page'] = injectable_page
else:
detection['type'] = 3
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we return any status info about error?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do we need that because usually that will be present in logs where it was present? And even if get it then how will we use it, as suppose we return 500 error to the client then sending any other data won't be needed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

In case of tanner error, snare should works normally (e.g. return index page). Imagine the situation, when we use snare with default tanner and we don't have access to tanner's log. Something happens, but we don't know what.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok, but this thing is when you want to give a particular status_code intentionally to give positive results for the attack, though I'll add that too for normal tanner error.

@afeena afeena merged commit b3d5ec0 into mushorg:develop Aug 16, 2017
@rnehra01 rnehra01 deleted the snare-tanner-comm branch August 16, 2017 17:35
afeena pushed a commit to afeena/tanner that referenced this pull request Dec 17, 2017
* Make different type of detection

* Make emulator compatible with the new structure

* fix tests

* fix typo
afeena pushed a commit to afeena/tanner that referenced this pull request Jan 20, 2018
* Make different type of detection

* Make emulator compatible with the new structure

* fix tests

* fix typo
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

2 participants