Exploit database

GH-51b9dee0a9fc2b7176517ada2bbd6d8e

2dukes/cyber-range-framework

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2021-44228

465 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files9

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

project/scenarios/recursive-csp/adminbot.js

JavaScript · 719 bytes
const fs = require('fs');
const path = require('path');
const flag = fs.readFileSync(path.resolve(__dirname, './flag.txt'), 'utf8');

function sleep(time) {
  return new Promise(resolve => {
    setTimeout(resolve, time)
  })
}

module.exports = {
  name: 'recursive-csp admin bot',
  urlRegex: /^https:\/\/recursive-csp\.mc\.ax\//,
  timeout: 10000,
  handler: async (url, ctx) => {
    const page = await ctx.newPage();
    await page.goto('https://recursive-csp.mc.ax', { timeout: 3000, waitUntil: 'domcontentloaded' });
    await page.evaluate(flag => {
        document.cookie = `flag=${flag}`;
    }, flag);
    await page.goto(url, { timeout: 3000, waitUntil: 'domcontentloaded' });
    await sleep(3000);
  }
}