🌐
GitHub
github.com › u17zl › SSTI-flask-session-forge
GitHub - u17zl/SSTI-flask-session-forge: A demo project for forging fake Flask session by SSTI(server-side template injection) · GitHub
A demo project for forging fake Flask session by SSTI(server-side template injection) - u17zl/SSTI-flask-session-forge
Author   u17zl
🌐
Stack Overflow
stackoverflow.com › questions › 70026269 › how-to-forge-and-encode-session-cookie
flask - How to forge and encode session cookie - Stack Overflow
cs = s.get(url + "control-robot", cookies = {"session":"new cookie"}) ... .eJwljktqBDEMRO_idRaWZf3mMo0tS8wQSKB7ZhVy93HIsgrq1fspR55x3cvteb7ioxyPVW5lOKSvyObSsJFop2UgcwWxatPJUNlGtiqrsggKB5pMwzqkcqWmXLUbZndj8ole2av4Wg07zdFtuBNHThhsRLD5DhCOfXOjbJHXFee_Dezo15nH8_szvv6K5P1ludh0WuyVkrqCJklrAjhw-_dRft9jlD5c.YZax6g.tS__qotCbmnLiJgutCjo5R-q3o0 · I assume this is in jwt format, thus I used flask decode which gives me following output:
🌐
Anaconda.org
anaconda.org › conda-forge › flask-session
flask-session - conda-forge | Anaconda.org
conda-forge/flask-session · Community · Server-side session support for Flask · Copied fromcf-staging / flask-session · Overview · Files 8 · Labels 1 · Badges · Versions · 0.8.0 · To install this package, run one of the following: $conda install conda-forge::flask-session ·
🌐
GitHub
github.com › u17zl › SSTI-flask-session-forge › blob › master › session_cookie_manager.py
SSTI-flask-session-forge/session_cookie_manager.py at master · u17zl/SSTI-flask-session-forge
A demo project for forging fake Flask session by SSTI(server-side template injection) - SSTI-flask-session-forge/session_cookie_manager.py at master · u17zl/SSTI-flask-session-forge
Author   u17zl
🌐
Medium
ldvargas.medium.com › hackpackctf-cookie-forge-3d922862d383
HackPackCTF — Cookie Forge - lofileox3264 - Medium
May 1, 2020 - Again with flask-unsign we set our parameters and add the secret key to create the cookie: ... And now we have the new forged cookie. We can now replace our existing session cookie data with this and it should read ‘flagship’:True giving us access to the page.
🌐
YouTube
youtube.com › watch
HackPack CTF - Forging Python Flask Session Cookies - YouTube
If you would like to support me, please like, comment & subscribe, and check me out on Patreon: https://patreon.com/johnhammond010E-mail: johnhammond010@gmai...
Published   May 1, 2020
🌐
GitHub
github.com › conda-forge › flask-session-feedstock
GitHub - conda-forge/flask-session-feedstock: A conda-smithy repository for flask-session. · GitHub
A conda-smithy repository for flask-session. Contribute to conda-forge/flask-session-feedstock development by creating an account on GitHub.
Forked by 3 users
🌐
YouTube
youtube.com › cryptocat
Decoding, Brute-Forcing and Crafting Flask Session Cookies - "web-intro" [DefCamp CTF 2022] - YouTube
Video walkthrough for the "web-intro" challenge from the @DefCampRO Capture The Flag (D-CTF) competition 2021/2022. In this challenge we brute-force a Flask ...
Published   February 13, 2022
Views   4K
🌐
Shells
book.jorianwoltjer.com › web › frameworks › flask
Flask | Practical CTF - Jorian Woltjer
If you have a SECRET_KEY of the Flask application, you can forge your own session= cookies.
🌐
Stack Overflow
stackoverflow.com › questions › 52643972 › forge-cookie-in-flask
Forge cookie in flask - Stack Overflow
I'm trying to forge a cookie using the secret key. Here is my code: Copyclass App(object): def __init__(self): self.secret_key = None app = App() app.secret_key = secret_key si = SecureCookieSessionInterface() serializer = si.get_signing_serializer(app) f = open('new','wb') session = serializer.dump(ast.Assertliteral_eval(PAYLOAD),f) f.close() f = open('new','rb') print f.read()
Find elsewhere
🌐
Medium
medium.com › @ahmednarmer1 › ctf-day-43-1a92e694ba8a
CTF Day(43). picoCTF Web Exploitation: Most Cookies
July 24, 2025 - The Goal Your objective is to forge a session with {"very_auth":"admin"}. To do this: Use a tool like flask-unsign to crack the secret key (since it's weak and from a known list).
🌐
CTFtime.org
ctftime.org › writeup › 20339
CTFtime.org / HackPack CTF 2020 / Cookie Forge / Writeup
April 20, 2020 - ``` $ flask-unsign --sign --secret password1 --cookie "{'flagship': True, 'username': 'toto'}" eyJmbGFnc2hpcCI6dHJ1ZSwidXNlcm5hbWUiOiJ0b3RvIn0.Xp2TRQ.XlXCKJYANDb9ghp5ms_fKQhTkVY ``` Using Burp repeater we modify our cookie to get the flag · ``` GET /flag HTTP/1.1 Host: cookie-forge.cha.hackpack.club Cookie: session=eyJmbGFnc2hpcCI6dHJ1ZSwidXNlcm5hbWUiOiJ0b3RvIn0.Xp2TRQ.XlXCKJYANDb9ghp5ms_fKQhTkVY Upgrade-Insecure-Requests: 1 ·
🌐
Medium
medium.com › @baraiprince0111 › exploiting-ssti-in-flask-to-forge-admin-sessions-ctf-birthday-card-writeup-of-pragyan-ctf25-by-d3343ca7add2
Exploiting SSTI in Flask to Forge Admin Sessions: CTF “Birthday Card” Writeup of Pragyan CTF’25 By NIT, Trichy. | by Baraiprince | Medium
February 9, 2025 - The challenge provides a Flask-based “Birthday Card Generator” website. The goal is to exploit a Server-Side Template Injection (SSTI) vulnerability to leak the Flask secret key, forge a malicious admin session cookie, and retrieve the flag from the /admin/report endpoint.
🌐
Prefix.dev
prefix.dev › channels › conda-forge › packages › flask-session
flask-session - conda-forge
pixi add flask-session · conda install -c https://prefix.dev/conda-forge flask-session · flask-session package does not contain a description · Loading chart data... 0.8.0 · BSD-3-Clause · noarch · 2 years ago · github.com/conda-forge/flask-session-feedstock ·
🌐
Tenable
tenable.com › plugins › was › 114434
Flask Weak Secret Key<!-- --> | Tenable®
September 24, 2024 - Flask applications use an application key to encrypt and sign various data, including session cookies and other sensitive information. When a weak or easily guessable application key is used, it compromises the security of the entire application. Attackers can potentially decrypt sensitive data, forge valid session cookies, or even execute remote code in some scenarios.
🌐
GitHub
github.com › conda-forge › flask-session-feedstock › blob › main › build-locally.py
flask-session-feedstock/build-locally.py at main · conda-forge/flask-session-feedstock
A conda-smithy repository for flask-session. Contribute to conda-forge/flask-session-feedstock development by creating an account on GitHub.
Author   conda-forge
🌐
Miguel Grinberg
blog.miguelgrinberg.com › post › how-secure-is-the-flask-user-session
How Secure Is The Flask User Session? - miguelgrinberg.com
April 4, 2016 - The client has no way to forge a session with a random email (unless the server's secret key is leaked), so security is not a concern. The only thing is that the email will be stored without encryption on the session.
🌐
GeeksforGeeks
geeksforgeeks.org › how-to-use-flask-session-in-python-flask
How to use Flask-Session in Python Flask - GeeksforGeeks
March 24, 2025 - The configuration sets the session type (filesystem) and defines whether sessions are permanent. ... from flask import Flask, render_template, redirect, request, session from flask_session import Session app = Flask(__name__) # Configuration app.config["SESSION_PERMANENT"] = False # Sessions expire when the browser is closed app.config["SESSION_TYPE"] = "filesystem" # Store session data in files # Initialize Flask-Session Session(app)