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 files3

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

project/bot/api/controllers/adminbot.js

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

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

module.exports = {
  name: 'impossible-xss admin bot',
  // urlRegex: /^https:\/\/impossible-xss.mc.ax\//,
  timeout: 10000,
  handler: async (url, ctx) => {
    const page = await ctx.newPage();
    await page.goto('https://google.com', { timeout: 3000, waitUntil: 'domcontentloaded' });

    // you wish it was that easy
    await page.setCookie({
      "name": "FLAG",
      "value": flag
    });
    await page.setJavaScriptEnabled(false);

    await page.goto(url, { timeout: 3000, waitUntil: 'domcontentloaded' });
    await sleep(3000);
  }
};