Rapid7 Vulnerability & Exploit Database

Python Flask Cookie Signer

Back to Search

Python Flask Cookie Signer

Disclosed
01/26/2019
Created
09/13/2023

Description

This is a generic module which can manipulate Python Flask-based application cookies. The Retrieve action will connect to a web server, grab the cookie, and decode it. The Resign action will do the same as above, but after decoding it, it will replace the contents with that in NEWCOOKIECONTENT, then sign the cookie with SECRET. This cookie can then be used in a browser. This is a Ruby based implementation of some of the features in the Python project Flask-Unsign.

Author(s)

  • h00die
  • paradoxis
  • Spencer McIntyre

Development

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use auxiliary/gather/python_flask_cookie_signer
msf auxiliary(python_flask_cookie_signer) > show actions
    ...actions...
msf auxiliary(python_flask_cookie_signer) > set ACTION < action-name >
msf auxiliary(python_flask_cookie_signer) > show options
    ...show and set options...
msf auxiliary(python_flask_cookie_signer) > run 

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;