Skip to content

Commit 11f45e7

Browse files
authored
Fixing Improper Cookie Handling Feature
2 parents c82bb6a + d713325 commit 11f45e7

File tree

10 files changed

+33
-24
lines changed

10 files changed

+33
-24
lines changed

CODE_OF_CONDUCT.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
5555
## Enforcement
5656

5757
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58-
reported by contacting the project team at code@enablesecurity.com. All
58+
reported by contacting the project lead at theinfecteddrake@gmail.com. All
5959
complaints will be reviewed and investigated and will result in a response that
6060
is deemed necessary and appropriate to the circumstances. The project team is
6161
obligated to maintain confidentiality with regard to the reporter of an incident.

LICENSE

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GNU GENERAL PUBLIC LICENSE
22
Version 3, 29 June 2007
33

4-
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
4+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
55
Everyone is permitted to copy and distribute verbatim copies
66
of this license document, but changing it is not allowed.
77

@@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively
631631
state the exclusion of warranty; and each file should have at least
632632
the "copyright" line and a pointer to where the full notice is found.
633633

634-
XSRFProbe, A Cross Site Request Forgery Audit Toolkit
635-
Copyright (C) 2018 @_tID
634+
<one line to give the program's name and a brief idea of what it does.>
635+
Copyright (C) <year> <name of author>
636636

637637
This program is free software: you can redistribute it and/or modify
638638
it under the terms of the GNU General Public License as published by
@@ -645,14 +645,14 @@ the "copyright" line and a pointer to where the full notice is found.
645645
GNU General Public License for more details.
646646

647647
You should have received a copy of the GNU General Public License
648-
along with this program. If not, see <http://www.gnu.org/licenses/>.
648+
along with this program. If not, see <https://www.gnu.org/licenses/>.
649649

650650
Also add information on how to contact you by electronic and paper mail.
651651

652652
If the program does terminal interaction, make it output a short
653653
notice like this when it starts in an interactive mode:
654654

655-
XSRFProbe Copyright (C) 2018 @_tID
655+
<program> Copyright (C) <year> <name of author>
656656
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657657
This is free software, and you are welcome to redistribute it
658658
under certain conditions; type `show c' for details.
@@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
664664
You should also get your employer (if you work as a programmer) or school,
665665
if any, to sign a "copyright disclaimer" for the program, if necessary.
666666
For more information on this, and how to apply and follow the GNU GPL, see
667-
<http://www.gnu.org/licenses/>.
667+
<https://www.gnu.org/licenses/>.
668668

669669
The GNU General Public License does not permit incorporating your program
670670
into proprietary programs. If your program is a subroutine library, you
671671
may consider it more useful to permit linking proprietary applications with
672672
the library. If this is what you want to do, use the GNU Lesser General
673673
Public License instead of this License. But first, please read
674-
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
674+
<https://www.gnu.org/licenses/why-not-lgpl.html>.

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<h1 align="center">
22
<br>
3-
<a href="https://github.com/0xinfection/xsrfprobe"><img src="https://i.ibb.co/rQzpKk6/circle-cropped.png" alt="wafw00f"/></a>
3+
<a href="https://github.com/0xinfection/xsrfprobe"><img src="https://i.ibb.co/rQzpKk6/circle-cropped.png" alt="xsrfprobe"/></a>
44
<br>
55
<br>
66
XSRFProbe
@@ -22,7 +22,7 @@
2222
</p>
2323

2424
### About:
25-
__XSRFProbe__ is an advanced [Cross Site Request Forgery](https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)) (CSRF/XSRF) Audit and Exploitation Toolkit. Equipped with a Powerful Crawling Engine and Numerous Systematic Checks, it is now able to detect most cases of CSRF vulnerabilities, their related bypasses and futher generate (maliciously) exploitable proof of concepts with each found vulnerability. For more info on how XSRFProbe works, see [XSRFProbe Internals](https://github.com/0xInfection/XSRFProbe/wiki#xsrfprobe-internals) on [wiki](https://github.com/0xInfection/XSRFProbe/wiki/).
25+
__XSRFProbe__ is an advanced [Cross Site Request Forgery](https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)) (CSRF/XSRF) Audit and Exploitation Toolkit. Equipped with a powerful crawling engine and numerous systematic checks, it is able to detect most cases of CSRF vulnerabilities, their related bypasses and futher generate (maliciously) exploitable proof of concepts with each found vulnerability. For more info on how XSRFProbe works, see [XSRFProbe Internals](https://github.com/0xInfection/XSRFProbe/wiki#xsrfprobe-internals) on [wiki](https://github.com/0xInfection/XSRFProbe/wiki/).
2626

2727
<img src="https://i.imgur.com/xTrfWSt.gif" alt="xsrf-logo">
2828
<p align="center">
@@ -91,4 +91,4 @@ Usage of XSRFProbe for testing websites without prior mutual consistency can be
9191
### Author's Words:
9292
This project is based __entirely upon my own research and my own experience with web applications__ on Cross-Site Request Forgery attacks. You can try going through the source code which is highly documented to help you understand how this toolkit was built. Useful [pull requests](https://github.com/0xInfection/XSRFProbe/wiki/Contributing), [ideas and issues](https://github.com/0xInfection/XSRFProbe/wiki/Reporting-Bugs#before-submitting) are highly welcome. If you wish to see what how XSRFProbe is being developed, check out the [Development Board](https://github.com/0xInfection/XSRFProbe/projects/1).
9393

94-
> Copyright (C) [0xInfection](https://www.twitter.com/0xInfection)
94+
> Copyright &copy; [@0xInfection](https://www.twitter.com/0xInfection)

setup.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@
1010
setup(
1111
name='xsrfprobe',
1212
version=__import__('xsrfprobe').__version__,
13+
description='The Prime Cross Site Request Forgery (CSRF) Audit & Exploitation Toolkit',
1314
long_description=desc,
1415
long_description_content_type='text/markdown',
1516
author='Pinaki Mondal',
1617
author_email='[email protected]',
1718
license='GPLv3',
1819
url='https://github.com/0xInfection/XSRFProbe',
19-
download_url='https://github.com/0xInfection/XSRFProbe/archive/v2.1.zip',
20+
download_url='https://github.com/0xInfection/XSRFProbe/archive/v2.1.1.zip',
2021
packages=find_packages(),
2122
scripts=['xsrfprobe/bin/xsrfprobe'],
2223
install_requires=[
@@ -31,12 +32,11 @@
3132
'Intended Audience :: System Administrators',
3233
'Intended Audience :: Developers',
3334
'Intended Audience :: Information Technology',
34-
'Intended Audience :: Developers',
3535
'Operating System :: OS Independent',
3636
'Topic :: Internet',
3737
'Topic :: Security',
3838
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
3939
'Programming Language :: Python :: 3',
4040
],
41-
keywords=['csrf', 'xsrf', 'appsec', 'vulnerability scanner', 'webapps'],
41+
keywords=['csrf', 'xsrf', 'appsec', 'vulnerability scanner', 'webapps', 'hacking'],
4242
)

xsrfprobe/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env python3
22

3-
__version__ = '2.1.0'
3+
__version__ = '2.1.1'
44
__license__ = 'GNU General Public License v3 (GPLv3)'

xsrfprobe/bin/xsrfprobe

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-
23

4+
#-:-:-:-:-:-:-::-:-:#
5+
# XSRF Probe #
6+
#-:-:-:-:-:-:-::-:-:#
7+
8+
# Author: 0xInfection
9+
# This module requires XSRFProbe
10+
# https://github.com/0xInfection/XSRFProbe
311

412
from xsrfprobe import xsrfprobe
513

xsrfprobe/core/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ def Engine(): # lets begin it!
292292
GetLogger() # The scanning has interrupted, so now we can log out all the links ;)
293293
sys.exit(1)
294294
except Exception as e:
295+
print('\n'+R+'Encountered an error. \n'+R+'Please view the error log files to view what went wrong.')
295296
verbout(R, e.__str__())
296297
ErrorLogger(url, e)
297298
GetLogger()
298-
sys.exit(1)

xsrfprobe/core/options.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767

6868
# Print out XSRFProbe version
6969
if args.version:
70-
print('\033[1;96m [+] \033[1;91mXSRFProbe Version\033[0m : '+__version__)
70+
print('\033[1;96m [+] \033[1;91mXSRFProbe Version\033[0m : v'+__version__)
7171
print('\033[1;96m [+] \033[1;91mXSRFProbe License\033[0m : '+__license__+'\n')
7272
quit()
7373

@@ -111,7 +111,7 @@
111111
# Assigning Cookie
112112
if ',' in args.cookie:
113113
for cook in args.cookie.split(','):
114-
config.COOKIE_VALUE[cook.split('=')[0].strip()] = cook.strip('=')[1].strip()
114+
config.COOKIE_VALUE[cook.split('=')[0].strip()] = cook.split('=')[1].strip()
115115
# This is necessary when a cookie value is supplied
116116
# Since if the user-agent used to make the request changes
117117
# from time to time, the remote site might trigger up

xsrfprobe/files/VersionNum

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.0
1+
2.1.1

xsrfprobe/files/config.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
# NOTE: This is a precaution in case the cookie value is supplied,
4141
# if the user-agent gets changed from time to time, the remote
4242
# application might trigger up some protection agents
43-
USER_AGENT = 'Mozilla/5.0 (Windows; U; Windows NT 10.0; en-US) AppleWebKit/604.1.38 (KHTML, like Gecko) Chrome/68.0.3325.162'
43+
USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.87 Safari/537.36'
4444

4545
# Cookie value to be sent alongwith the requests. This option is particularly
4646
# needed for a wholesome check on CSRFs. Since for a basic successful CSRF attack
@@ -60,9 +60,10 @@
6060

6161
# Header values to be used (Modify it as per your need)
6262
HEADER_VALUES = {
63-
'Accept' : 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
64-
'Accept-Language' : 'en-US,en;q=0.5',
65-
'Accept-Encoding' : 'gzip',
63+
'Accept' : 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3',
64+
'Accept-Language' : 'en-US,en;q=0.9',
65+
'Accept-Encoding' : 'gzip, deflate, br',
66+
'Sec-Fetch-Mode' : 'navigate',
6667
'DNT' : '1', # Do Not Track Request Header :D
6768
'Connection' : 'close'
6869
}

0 commit comments

Comments
 (0)