Package: badsecrets
badsecretsA pure python library for identifying the use of known or very weak cryptographic secrets across a variety of platforms. The project is designed to be both a repository of various "known secrets" (for example, ASP.NET machine keys found in examples in tutorials), and to provide a language-agnostic abstraction layer for identifying their use.Knowing when a 'bad secret' was used is usually a matter of examining some cryptographic product in which the secret was used: for example, a cookie which is signed with a keyed hashing algorithm. Things can get complicated when you dive into the individual implementation oddities each platform provides, which this library aims to alleviate.Check out our fullblog poston the Black Lantern Security blog!Inspired byBlacklist3r, with a desire to expand on the supported platforms and remove language and operating system dependencies.Current ModulesNameDescriptionASPNET_ViewstateChecks the viewstate/generator against a list of known machine keys.Telerik_HashKeyChecks patched (2017+) versions of Telerik UI for a known Telerik.Upload.ConfigurationHashKeyTelerik_EncryptionKeyChecks patched (2017+) versions of Telerik UI for a known Telerik.Web.UI.DialogParametersEncryptionKeyFlask_SignedCookiesChecks for weak Flask cookie signing password. Wrapper forflask-unsignPeoplesoft_PSTokenCan check a peoplesoft PS_TOKEN for a bad/weak signing passwordDjango_SignedCookiesChecks django's session cookies (when in signed_cookie mode) for known django secret_keyRails_SecretKeyBaseChecks Ruby on Rails signed or encrypted session cookies (from multiple major releases) for known secret_key_baseGeneric_JWTChecks JWTs for known HMAC secrets or RSA private keysJsf_viewstateChecks Both Mojarra and Myfaces implimentations of Java Server Faces (JSF) for use of known or weak secret keysSymfony_SignedURLChecks symfony "_fragment" urls for known HMAC key. Operates on Full URL, including hashExpress_SignedCookies_ESChecks express.js express-session middleware for signed cookies and session cookies for known 'session secret'Express_SignedCookies_CSChecks express.js cookie-session middleware for signed cookies and session cookies for known secretLaravel_SignedCookiesChecks 'laravel_session' cookies for known laravel 'APP_KEY'ASPNET_VstateChecks for a once popular custom compressed Viewstatecode snippetvulnerable to RCEInstallationWe have apypipackage, so you can just dopip install badsecretsto make use of the library.Simple UsageThe best way to use Badsecrets is by simply runningbadsecretsafter doing a pip install:pip install badsecrets
badsecrets eyJhbGciOiJIUzI1NiJ9.eyJJc3N1ZXIiOiJJc3N1ZXIiLCJVc2VybmFtZSI6IkJhZFNlY3JldHMiLCJleHAiOjE1OTMxMzM0ODMsImlhdCI6MTQ2NjkwMzA4M30.ovqRikAo_0kKJ0GVrAwQlezymxrLGjcEiW_s3UJMMCoUnder the hood, it's using thecli.pyexample. The CLI can also be accessed manually without a pip installation:Without pip installation:gitclonehttps://github.com/blacklanternsecurity/badsecrets.gitcdbadsecrets
python./badsecrets/examples/cli.pyeyJhbGciOiJIUzI1NiJ9.eyJJc3N1ZXIiOiJJc3N1ZXIiLCJVc2VybmFtZSI6IkJhZFNlY3JldHMiLCJleHAiOjE1OTMxMzM0ODMsImlhdCI6MTQ2NjkwMzA4M30.ovqRikAo_0kKJ0GVrAwQlezymxrLGjcEiW_s3UJMMCoExamplesTo use the examples, after doing the pip install justgit clonethe repo andcdinto thebadsecretsdirectory:git clone https://github.com/blacklanternsecurity/badsecrets.git
cd badsecretsThe commands in the example section below assume you are in this directory.If you are using the BadsecretsBBOTmodule, you don't need to do anything else - BBOT will install the package for you.cli.pyBad secrets includes anexample CLIfor convenience when manually checking secrets. As mentioned above, it is also accessible by just executingbadsecrets, after a successful pip install.Usageusage: badsecrets [-h] [-nc] [-u URL] [-nh] [-c CUSTOM_SECRETS] [-p PROXY] [-a USER_AGENT] [product ...]

Check cryptographic products against badsecrets library

positional arguments:
  product               Cryptographic product to check for known secrets

options:
  -h, --help            show this help message and exit
  -nc, --no-color       Disable color message in the console
  -u URL, --url URL     Use URL Mode. Specified the URL of the page to access and attempt to check for secrets
  -nh, --no-hashcat     Skip the check for compatable hashcat commands when secret isn't found
  -c CUSTOM_SECRETS, --custom-secrets CUSTOM_SECRETS
                        include a custom secrets file to load along with the default secrets
  -p PROXY, --proxy PROXY
                        In URL mode, Optionally specify an HTTP proxy
  -a USER_AGENT, --user-agent USER_AGENT
                        In URL mode, Optionally set a custom user-agentBasic usage - checking a crytographic product for a known secret (against all modules):badsecretseyJhbGciOiJIUzI1NiJ9.eyJJc3N1ZXIiOiJJc3N1ZXIiLCJVc2VybmFtZSI6IkJhZFNlY3JldHMiLCJleHAiOjE1OTMxMzM0ODMsImlhdCI6MTQ2NjkwMzA4M30.ovqRikAo_0kKJ0GVrAwQlezymxrLGjcEiW_s3UJMMCoIt has a URL mode, which will connect to a target and attempt to carve for cryptographic products and check any it finds against all modules.URL Modebadsecrets--urlhttp://example.com/contains_bad_secret.htmlYou can also set a custom user-agent with--user-agent "user-agent string"or a proxy with--proxy http://127.0.0.1in this mode.Example output:$badsecretseyJhbGciOiJIUzI1NiJ9.eyJJc3N1ZXIiOiJJc3N1ZXIiLCJVc2VybmFtZSI6IkJhZFNlY3JldHMiLCJleHAiOjE1OTMxMzM0ODMsImlhdCI6MTQ2NjkwMzA4M30.ovqRikAo_0kKJ0GVrAwQlezymxrLGjcEiW_s3UJMMCo__)||__\_`|_`|__|_\__|__|_\__|__|||(|(|\__\__/(|__/|\__\____/\__,_|\__,_|____/\___|\___|_|\___|\__|____/v0.3.337

KnownSecretFound!

DetectingModule:Generic_JWT

ProductType:JSONWebToken(JWT)Product:eyJhbGciOiJIUzI1NiJ9.eyJJc3N1ZXIiOiJJc3N1ZXIiLCJVc2VybmFtZSI6IkJhZFNlY3JldHMiLCJleHAiOjE1OTMxMzM0ODMsImlhdCI6MTQ2NjkwMzA4M30.ovqRikAo_0kKJ0GVrAwQlezymxrLGjcEiW_s3UJMMCo
SecretType:HMAC/RSAKey
Location:manual
Secret:1234Details:{'Issuer':'Issuer','Username':'BadSecrets','exp':1593133483,'iat':1466903083,'jwt_headers':{'alg':'HS256'}}HashcatBy default, when a secret is NOT found, the provided product will be checked for potential hashcat matches. If there is a match, a nearly complete hashcat command will be produced (potentially) suitable for cracking the product via hashcat. This can let you get those keys that may not be known, but are weak and still crackable. Not all modules are capable of producing hashcat output. This behavior can be disabled with the--no-hashcatoption.badsecrets eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.qvkcSLMQPAQdEuRFv0h3aQIRpTfaI57GjXLOWI_6NaEExample output:__ )              |                                |         
 __ \    _` |   _` |   __|   _ \   __|   __|   _ \  __|   __| 
 |   |  (   |  (   | \__ \   __/  (     |      __/  |   \__ \ 
____/  \__,_| \__,_| ____/ \___| \___| _|    \___| \__| ____/ 

v0.3.337

No secrets found :(

Potential matching hashcat commands:

Module: [Flask_SignedCookies] Flask Signed Cookie Command: [hashcat -m 29100 -a 0 eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.qvkcSLMQPAQdEuRFv0h3aQIRpTfaI57GjXLOWI_6NaE <dictionary_file>]
Module: [Generic_JWT] JSON Web Token (JWT) Algorithm: HS256 Command: [hashcat -m 16500 -a 0 eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.qvkcSLMQPAQdEuRFv0h3aQIRpTfaI57GjXLOWI_6NaE  <dictionary_file>]Custom Secret ListsIt is possible to specify a file containing additional secrets. These will be added to the default lists when the check is performed. This is accomplished with the-c/--custom-secretsflag. The provided value must be a valid file. There is a 100k size limit on the provided file.badsecrets eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.vKxsE0u-TrpoMQ5zmBv1_I-NXSgouq6iZJWMHbHSmgY -c test.txtExample output:__ )              |                                |         
 __ \    _` |   _` |   __|   _ \   __|   __|   _ \  __|   __| 
 |   |  (   |  (   | \__ \   __/  (     |      __/  |   \__ \ 
____/  \__,_| \__,_| ____/ \___| \___| _|    \___| \__| ____/ 

v0.3.337

Including custom secrets list [test.txt]

Known Secret Found!

Detecting Module: Generic_JWT

Product Type: JSON Web Token (JWT)
Product: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.vKxsE0u-TrpoMQ5zmBv1_I-NXSgouq6iZJWMHbHSmgY
Secret Type: HMAC/RSA Key
Location: manual
Secret: fake123
Details: {'sub': '1234567890', 'name': 'John Doe', 'iat': 1516239022, 'jwt_headers': {'alg': 'HS256', 'typ': 'JWT'}}Blacklist3r.pyNote: This is now obsolete, sincecli.pyis now capable of handling machinekeys/generator values. It will remain included for reference.Example:badsecrets KLox5XeGYfb7Lo8zFzr1YepUagXuixcxX55lpFht+rrW6VGheZi831vdusH6DCMfxIhsLG1EPU3OuPvqN2XBc/fj0ew15TQ1zBmmKWJVns4= AAAAAAAABad secrets includes afully functional CLI examplewhich replicates the functionality ofblacklist3rin python badsecrets/examples/blacklist3r.python./badsecrets/examples/blacklist3r.py--urlhttp://vulnerablesite/vulnerablepage.aspx
python./badsecrets/examples/blacklist3r.py--viewstate/wEPDwUJODExMDE5NzY5ZGQMKS6jehX5HkJgXxrPh09vumNTKQ==--generatorEDD8C9AETelerik_knownkey.pyFully functional CLI example for identifying known Telerik Hash keys (Telerik.Upload.ConfigurationHashKey) and Encryption keys (Telerik.Web.UI.DialogParametersEncryptionKey) used with Telerik DialogHandler instances for Post-2017 versions (those patched for CVE-2017-9248), and brute-forcing version / generating exploitation DialogParameters values.Currently, this appears to be the only tool capable of building a working exploit URL for "patched" versions of Telerik.python./badsecrets/examples/telerik_knownkey.py--urlhttp://vulnerablesite/Telerik.Web.UI.DialogHandler.aspxOptionally include ASP.NET MachineKeys with --machine-keys (Will SIGNIFICANTLY increase brute-forcing time)Update: This utility will now, in addition to theTelerik.Web.UI.DialogHandler.aspxendpoint, also detect knownTelerik.AsyncUpload.ConfigurationEncryptionKeykeys in use via theTelerik.Web.UI.WebResource.axdendpoint.python./badsecrets/examples/telerik_knownkey.py--urlhttp://vulnerablesite/Telerik.Web.UI.WebResource.axdSymfony_knownkey.pyBrute-force detection of Symfony known secret key when "_fragment" URLs are enabled, even when no example URL containing a hash can be located.Relevent Blog Post.python./badsecrets/examples/symfony_knownkey.py--urlhttps://localhost/BBOT ModuleOne of the best ways to use Badsecrets, especially for theASPNET_ViewstateandJsf_viewstatemodules is with the BadsecretsBBOTmodule. This will allow you to easily check across thousands of systems in conjunction with subdomain enummeration.bbot -f subdomain-enum -m badsecrets -t evil.corpBasic library usagecheck_secretSee if a token or other cryptographic product was produced with a known keyfrombadsecretsimportmodules_loadedDjango_SignedCookies=modules_loaded["django_signedcookies"]ASPNET_Viewstate=modules_loaded["aspnet_viewstate"]Flask_SignedCookies=modules_loaded["flask_signedcookies"]Peoplesoft_PSToken=modules_loaded["peoplesoft_pstoken"]Telerik_HashKey=modules_loaded["telerik_hashkey"]Telerik_EncryptionKey=modules_loaded["telerik_encryptionkey"]Rails_SecretKeyBase=modules_loaded["rails_secretkeybase"]Generic_JWT=modules_loaded["generic_jwt"]Jsf_viewstate=modules_loaded["jsf_viewstate"]Symfony_SignedURL=modules_loaded["symfony_signedurl"]Express_SignedCookies_ES=modules_loaded["express_signedcookies_es"]Express_SignedCookies_CS=modules_loaded["express_signedcookies_cs"]Laravel_SignedCookies=modules_loaded["laravel_signedcookies"]ASPNET_Vstate=modules_loaded["aspnet_vstate"]x=ASPNET_Viewstate()print(f"###{str(x.__class__.__name__)}###")r=x.check_secret("AgF5WuyVO11CsYJ1K5rjyuLXqUGCITSOapG1cYNiriYQ6VTKochMpn8ws4eJRvft81nQIA==","EDD8C9AE")ifr:print(r)else:print("KEY NOT FOUND :(")x=Telerik_HashKey()print(f"###{str(x.__class__.__name__)}###")r=x.check_secret("vpwClvnLODIx9te2vO%2F4e06KzbKkjtwmNnMx09D1Dmau0dPliYzgpqB9MnE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temmIaH5NtV7xt8XS%2BqwghdJl1D06%2FWhpMtJ1%2FoQGoJ0%2F7ChYyefyAfsiQNWsO66UNVyl71RVPwATnbRO5K5mtxn0M2wuXXpAARNh6pQTcVX%2FTJ4jmosyKwhI6I870NEOsSaWlKVyOdb97C3Bt0pvzq8BagV5FMsNtJKmqIIM0HRkMkalIyfow9iS%2B5xGN5eKM8NE4E6hO4CvmpG%2BH2xFHTSNzloV0FjLdDmj5UfMjhUuEb3rkKK1bGAVaaherp6Ai6N4YJQzh%2FDdpo6al95EZN2OYolzxitgDgsWVGhMvddyQTwnRqRY04hdVJTwdhi4TiCPbLJ1Wcty2ozy6VDs4w77EOAQ5JnxUmDVPA3vXmADJZR0hIJEsuxXfYg%2BRIdV4fzGunV4%2B9jpiyM9G11iiesURK82o%2BdcG7FaCkkun2K2bvD6qGcL61uhoxNeLVpAxjrRjaEBrXsexZ9rExpMlFD8e3NM%2B0K0LQJvdEvpWYS5UTG9cAbNAzBs%3DpDsPXFGf2lEMcyGaK1ouARHUfqU0fzkeVwjXU9ORI%2Fs%3D")ifr:print(r)else:print("KEY NOT FOUND :(")x=Flask_SignedCookies()print(f"###{str(x.__class__.__name__)}###")r=x.check_secret("eyJoZWxsbyI6IndvcmxkIn0.XDtqeQ.1qsBdjyRJLokwRzJdzXMVCSyRTA")ifr:print(r)else:print("KEY NOT FOUND :(")x=Peoplesoft_PSToken()print(f"###{str(x.__class__.__name__)}###")r=x.check_secret("qAAAAAQDAgEBAAAAvAIAAAAAAAAsAAAABABTaGRyAk4AdQg4AC4AMQAwABSpxUdcNT67zqSLW1wY5/FHQd1U6mgAAAAFAFNkYXRhXHicHYfJDUBQAESfJY5O2iDWgwIsJxHcxdaApTvFGX8mefPmAVzHtizta2MSrCzsXBxsnOIt9yo6GvyekZqJmZaBPCUmVUMS2c9MjCmJKLSR/u+laUGuzwdaGw3o")ifr:print(r)else:print("KEY NOT FOUND :(")x=Django_SignedCookies()print(f"###{str(x.__class__.__name__)}###")r=x.check_secret(".eJxVjLsOAiEURP-F2hAuL8HSfr-BAPciq4ZNlt3K-O9KsoU2U8w5My8W4r7VsHdaw4zswoCdfrsU84PaAHiP7bbwvLRtnRMfCj9o59OC9Lwe7t9Bjb2OtbMkAEGQtQjekykmJy9JZIW-6CgUaCGsA6eSyV65s1Qya_xGKZrY-wPVYjdw:1ojOrE:bfOktjgLlUykwCIRIpvaTZRQMM3-UypscEN57ECtXis")ifr:print(r)else:print("KEY NOT FOUND :(")x=Rails_SecretKeyBase()print(f"###{str(x.__class__.__name__)}###")r=x.check_secret("dUEvRldLekFNcklGZ3ZSbU1XaHJ0ZGxsLzhYTHlNTW43T3BVN05kZXE3WUhQOVVKbVA3Rm5WaSs5eG5QQ1VIRVBzeDFNTnNpZ0xCM1FKbzFZTEJISzhaNzFmVGYzME0waDFURVpCYm5TQlJFRmRFclYzNUZhR3VuN29PMmlkVHBrRi8wb3AwZWgvWmxObkFOYnpkeHR1YWpWZ3lnN0Y4ZW9xSk9LNVlQd0U4MmFsbWtLZUI5VzkzRkM4YXBFWXBWLS15L00xME1nVFp2ZTlmUWcxZVlpelpnPT0=--7efe7919a5210cfd1ac4c6228e3ff82c0600d841")ifr:print(r)else:print("KEY NOT FOUND :(")x=Generic_JWT()print(f"###{str(x.__class__.__name__)}###")r=x.check_secret("eyJhbGciOiJIUzI1NiJ9.eyJJc3N1ZXIiOiJJc3N1ZXIiLCJVc2VybmFtZSI6IkJhZFNlY3JldHMiLCJleHAiOjE1OTMxMzM0ODMsImlhdCI6MTQ2NjkwMzA4M30.ovqRikAo_0kKJ0GVrAwQlezymxrLGjcEiW_s3UJMMCo")ifr:print(r)else:print("KEY NOT FOUND :(")x=Telerik_EncryptionKey()print(f"###{str(x.__class__.__name__)}###")r=x.check_secret("owOnMokk%2F4N7IMo6gznRP56OYIT34dZ1Bh0KBbXlFgztgiNNEBYrgWRYDBkDlX8BIFYBcBztC3NMwoT%2FtNF%2Ff2nCsA37ORIgfBem1foENqumZvmcTpQuo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ocYKAb91SMpn1fXVPBgkPM27QZxHnSAmWVbJR2%2FIhO%2BIVNzkgFAJlptiEPPPTxuBh%2BTT7CaIQE3oZbbJeQKvRkrt4bawTCOzciU%2F1zFGxubTJTSyInjQ8%2F1tVo7KjnxPKqGSfwZQN%2FeWL6R%2FpvCb%2BE6D4pdyczoJRUWsSNXNnA7QrdjgGNWhyOMiKvkDf3RD4mrXbul18WYVTsLyp0hvQsbdwBWOh7VlwfrWdy%2BklsttFi%2B%2BadKR7DbwjLTcxvdNpTx1WJhXROR8jwW26VEYSXPVqWnYvfyZo4DojKHMSDMbAakbuSJdkGP1d5w0AYbKlAcVQOqp9hbAvfwwLy4ErdIsOg0YEeCcnQVRAXwaCI9JvWWmM%2FzYJzE3X45A6lU9Pe7TAbft810MYh7lmV6Keb5HI6qXFiD%2B8khBZqi%2FsK6485k0a86aWLxOb4Eqnoc41x%2BYPv5CWfvP6cebsENo%3D%2BIUg0f64C4y77N4FZ6C82m5wMpvDQIHqx0ZFIHLhwMg%3D")ifr:print(r)else:print("KEY NOT FOUND :(")x=Jsf_viewstate()print(f"###{str(x.__class__.__name__)}###")r=x.check_secret("wHo0wmLu5ceItIi+I7XkEi1GAb4h12WZ894pA+Z4OH7bco2jXEy1RSCWwjtJcZNbWPcvPqL5zzfl03DoeMZfGGX7a9PSv+fUT8MAeKNouAGj1dZuO8srXt8xZIGg+wPCWWCzcX6IhWOtgWUwiXeSojCDTKXklsYt+kzlVbk5wOsXvb2lTJoO0Q==")ifr:print(r)else:print("KEY NOT FOUND :(")x=Symfony_SignedURL()print(f"###{str(x.__class__.__name__)}###")r=x.check_secret("https://localhost/_fragment?_path=_controller%3Dsystem%26command%3Did%26return_value%3Dnull&_hash=Xnsvx/yLVQaimEd1CfepgH0rEXr422JnRSn/uaCE3gs=")ifr:print(r)else:print("KEY NOT FOUND :(")x=Express_SignedCookies_ES()print(f"###{str(x.__class__.__name__)}###")r=x.check_secret("s%3A8FnPwdeM9kdGTZlWvdaVtQ0S1BCOhY5G.qys7H2oGSLLdRsEq7sqh7btOohHsaRKqyjV4LiVnBvc")ifr:print(r)else:print("KEY NOT FOUND :(")x=Express_SignedCookies_CS()print(f"###{str(x.__class__.__name__)}###")r=x.check_secret("foo=eyJ1c2VybmFtZSI6IkJib3RJc0xpZmUifQ==","zOQU7v7aTe_3zu7tnVuHi1MJ2DU")ifr:print(r)else:print("KEY NOT FOUND :(")x=Laravel_SignedCookies()print(f"###{str(x.__class__.__name__)}###")r=x.check_secret("eyJpdiI6IlhlNTZ2UjZUQWZKVHdIcG9nZFkwcGc9PSIsInZhbHVlIjoiRlUvY2grU1F1b01lSXdveXJ0T3N1WGJqeVVmZlNRQjNVOWxiSzljL1Z3RDhqYUdDbjZxMU9oSThWRzExT0YvUmthVzVKRE9kL0RvTEw1cFRhQkphOGw4S2loV1ZrMkkwTHd4am9sZkJQd2VCZ3R0VlFSeFo3ay9wTlBMb3lLSG8iLCJtYWMiOiJkMmU3M2ExNDc2NTc5YjAwMGMwMTdkYTQ1NThkMjRkNTY2YTE4OTg2MzY5MzE5NGZmOTM4YWVjOGZmMWU4NTk2IiwidGFnIjoiIn0%3D")ifr:print(r)else:print("KEY NOT FOUND :(")x=ASPNET_Vstate()print(f"###{str(x.__class__.__name__)}###")r=x.check_secret("H4sIAAAAAAAEAPvPyJ/Cz8ppZGpgaWpgZmmYAgAAmCJNEQAAAA==")ifr:print(r)else:print("KEY NOT FOUND :(")CarveAn additional layer of abstraction above check_secret, which accepts a python requests.response object or a stringimportrequestsfrombadsecretsimportmodules_loadedTelerik_HashKey=modules_loaded["telerik_hashkey"]x=Telerik_HashKey()res=requests.get(f"http://example.com/")r_list=x.carve(requests_response=res)print(r_list)telerik_dialogparameters_sample="""Sys.Application.add_init(function() {$create(Telerik.Web.UI.RadDialogOpener, {"_dialogDefinitions":{"ImageManager":{"SerializedParameters":"gRRgyE4BOGtN/LtBxeEeJDuLj/UwIG4oBhO5rCDfPjeH10P8Y02mDK3B/tsdOIrwILK7Xj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ISv3wdp0RhcyLePff6pOhzFcJw3uHmgKL14+JLP1QhiaayzDRJIZgRlHZKpdb+gpK2dSgMyEjlF42YCIGbDY05JGWo3aohRvgsWvZFbYs4UsQTErvOph6XqrdMMzboO93FVtYeBBH+T0l44byTTwvB9jB2+zI/FX5w+sP1auBXMUoSIf8zeznvgnUA/WOsgOJtFvKCjzVqqvmwJXLKb48DgjI86dFLiehcEuTXtINB3la0+OPWxRvEEzsiQv8ec01Pe4UbhvL7PIxVsZyTqycqRz+3aQ41JTgiKwCG+4XvyWeHatFUpRkEZuUS8MthaMTZw4h0vVhoyN0mEXBA7/OEJapSg2eB0OZuGK4OzMIJwc+F9SROzF82jQHTG7EZCU+1siwx0H39fbOVdqAurpdBuw4Bcu2i7fTmkhzMYYyasTQsWlN9sgERV2vXJ8R67+U5VErzyJdflQ90EY1lMsUtV3FfX/8wBAFqD9wvbeM61SsKiBOZ3mYKmNws4IVouAFfEdPbBfz/p47cXhxo2usd+PW4pA8dh1frEFeztnLT/08h/Ig6TzOUNTLml09BAtheLtVARuEribkVK+cDTGO6NNxcSd+smyRP7y2jL+ueuW+xupE/ywrF/t9VZMAXYY9F6Ign8ctYmtQxlspVuuPc+jQATCVNkc5+ByWVI/qKRr8rIX5YPS6PmDPFPTwWo+F8DpZN5dGBaPtRPJwt3ck76+/m6B8SJMYjK6+NhlWduihJJ3Sm43OFqKwihUSkSzBMSUY3Vq8RQzy4CsUrVrMLJIscagFqMTGR4DRvo+i5CDya+45pLt0RMErfAkcY7Fe8oG3Dg7b6gVM5W0UP7UhcKc4ejO2ZZrd0UquCgbO4xm/lLzwi5bPEAL5PcHJbyB5BzAKwUQiYRI+wPEPGr/gajaA==mFauB5rhPHB28+RqBMxN2jCvZ8Kggw1jW3f/h+vLct0=","Width":"770px","Height":"588px","Title":"Image Manager"}"""r_list=x.carve(body=telerik_dialogparameters_sample)print(r_list)Check all modules at oncefrombadsecrets.baseimportcheck_all_modulestests=["yJrdyJV6tkmHLII2uDq1Sl509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OC9Lwe7t9Bjb2OtbMkAEGQtQjekykmJy9JZIW-6CgUaCGsA6eSyV65s1Qya_xGKZrY-wPVYjdw:1ojOrE:bfOktjgLlUykwCIRIpvaTZRQMM3-UypscEN57ECtXis","eyJhbGciOiJIUzI1NiJ9.eyJJc3N1ZXIiOiJJc3N1ZXIiLCJVc2VybmFtZSI6IkJhZFNlY3JldHMiLCJleHAiOjE1OTMxMzM0ODMsImlhdCI6MTQ2NjkwMzA4M30.ovqRikAo_0kKJ0GVrAwQlezymxrLGjcEiW_s3UJMMCo","dUEvRldLekFNcklGZ3ZSbU1XaHJ0ZGxsLzhYTHlNTW43T3BVN05kZXE3WUhQOVVKbVA3Rm5WaSs5eG5QQ1VIRVBzeDFNTnNpZ0xCM1FKbzFZTEJISzhaNzFmVGYzME0waDFURVpCYm5TQlJFRmRFclYzNUZhR3VuN29PMmlkVHBrRi8wb3AwZWgvWmxObkFOYnpkeHR1YWpWZ3lnN0Y4ZW9xSk9LNVlQd0U4MmFsbWtLZUI5VzkzRkM4YXBFWXBWLS15L00xME1nVFp2ZTlmUWcxZVlpelpnPT0=--7efe7919a5210cfd1ac4c6228e3ff82c0600d841","https://localhost/_fragment?_path=_controller%3Dsystem%26command%3Did%26return_value%3Dnull&_hash=Xnsvx/yLVQaimEd1CfepgH0rEXr422JnRSn/uaCE3gs=","s%3A8FnPwdeM9kdGTZlWvdaVtQ0S1BCOhY5G.qys7H2oGSLLdRsEq7sqh7btOohHsaRKqyjV4LiVnBvc"]fortestintests:r=check_all_modules(test)ifr:print(r)else:print("Key not found!")Carve all modules at onceimportrequestsfrombadsecrets.baseimportcarve_all_modules### using python requests response objectres=requests.get(f"http://example.com/")r_list=carve_all_modules(requests_response=res)print(r_list)### Using stringcarve_source_text="""<html><head><title>Test</title></head><body><p>Some text</p><div class="JWT_IN_PAGE"><p>eyJhbGciOiJIUzI1NiJ9.eyJJc3N1ZXIiOiJJc3N1ZXIiLCJVc2VybmFtZSI6IkJhZFNlY3JldHMiLCJleHAiOjE1OTMxMzM0ODMsImlhdCI6MTQ2NjkwMzA4M30.ovqRikAo_0kKJ0GVrAwQlezymxrLGjcEiW_s3UJMMCo</p></div></body></html>"""r_list=carve_all_modules(body=carve_source_text)print(r_list)ContributionsNothing would make us happier than getting a pull request with a new module! But the easiest way to contribute would be helping to populate our word lists! If you find publicly available keys help us make Badsecrets more useful by submitting a pull request to add them.Requests for modules are always very welcome as well!Planned Modules and Future DevelopmentLaravelExpressResearch into network devices with default keys that are detectable via a cryptographic product (For example, Palo Alto Global Protect default masterkeys)