Giter Site home page Giter Site logo

ruulian / cspass Goto Github PK

View Code? Open in Web Editor NEW
37.0 1.0 2.0 402 KB

This tool allows to automatically test for Content Security Policy bypass payloads.

Home Page: https://0xhorizon.eu/

License: MIT License

Python 100.00%
content security policy content-security-policy python pentest web

cspass's Introduction

Hi everyone ๐Ÿ‘‹

I am a french cybersecurity and low level enjoyer. I like to pwn everything even if I can't pwn everything yet.. You can find my posts on my blog and my tools here.

๐Ÿ”จ Tools

Pwn:

  • initramfs-toolkit : Toolkit that allows to extract and compress initramfs cpio, useful for Linux kernel exploitation.

Web:

  • WConsole Extractor : Automatically exploits a Werkzeug development server in debug mode with an arbitrary file read
  • CSPass : Automatically test for Content Security Policy bypass payloads.

๐Ÿ“„ Posts

writeups:

๐Ÿ“ง Contact

You can reach me on twitter or on discord:

cspass's People

Contributors

p0dalirius avatar ruulian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

babywyrm

cspass's Issues

Issue when formatting CSP

Hi, after your presentation for TheBlackSide, I just wanted to try your tool briefly ^^.

There seems to be an issue when formatting CSP. When running your tool, I have this issue:
Traceback (most recent call last):
File "cspass.py", line 364, in
csps = page.format_csp()
File "cspass.py", line 192, in format_csp
csp[policyname] = " ".join(self.csp[policyname])
TypeError: 'str' object does not support item assignment

I did not read the code thoroughly and do not have a lot of time today, but I think you probably just have an indentation issue in format_csp function (seems to work on my tests when fixing it and it did not seem to break something else (I only saw one call to format_csp)) :
"csp = json.dumps(csp,indent=4 )" should not be in the for loop because then it is a string and no more a dictionary, so if you have more than one policy "policyname", it crashes. Just change its indentation (same as your "return csp" line just after).

Thanks for your tool :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.