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 files10

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

project/scenarios/codebox/adminbot.js

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

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

module.exports = {
  name: 'codebox admin bot',
  urlRegex: /^https:\/\/codebox\.mc\.ax\/\?code=.*$/,
  timeout: 10000,
  handler: async (url, ctx) => {
    const page = await ctx.newPage();
    await page.goto('https://codebox.mc.ax', { timeout: 3000, waitUntil: 'domcontentloaded' });
    await page.evaluate(flag => {
        localStorage.setItem('flag', flag);
    }, flag);
    await page.goto(url, { timeout: 3000, waitUntil: 'domcontentloaded' });
    await sleep(3000);
  }
}