utctf - Fast Fox

Initially attempted to log the window variable which can give an indication of how limited the code execution is.

    
      console.log( window );
    
    
    errors:
    510343821206210853.js:1:1 ReferenceError: window is not defined
    Stack:
      @510343821206210853.js:1:1
    
  

No window variable was set, real weird if this was supposed to be executing just typical javascript. Re-reading the challenge description places an emphasis on something called JSShell. The first couple of google attempts just shows reverse shells but this is clearly not the case as attempting to execute a simple unix command gives the same error as previous. Eventually this page is found:
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Introduction_to_the_JavaScript_shell

Picking this function at random to attempt to test and check that whatever is executing input actually IS the JSShell which this page is documentation for. If there is an error when running gc() then the assumption was wrong otherwise the documentation page will definitely have some useful functions

    
    	gc()
    
    
       (no output)
    
  

The function didn't throw an error! So remember the goal is to read a "/flag.txt" file. With that in mind the function shown below could be useful.

	
	console.log( read( "/flag.txt" ) )
	
	
	output:
	utflag{d1d_y0u_us3_a_j1t_bug_0r_nah}