0.3.2 • Published 10 years ago
hakkit v0.3.2
This is still in development. Pushed versions are mostly stable, but the APIs are experimental and subject to change. Please use at your own risk
HakKit
HakKit is a collection of tools, similar in vein to pwnlib that provides a number of resources for doing security and CTF tasks. In addition to providing security related tools, HakKit has a number of utilities that make it easier to write node scripts that interact with the outside world.
Currently supported modules are:
Documentation is provided as well as numerous examples.
Usage
npm install hakkitvar hakkit = require("hakkit")Programs
s = new hakkit.spawn.cmd("/bin/bash", [], "stdout", {BOO: "FOO"})
var tb = new hakkit.tube(s)
tb.interactive()echo $BOO
FOONetworking
s = new hakkit.spawn.net("dttw.tech", 80)
var tb = new hakkit.tube(s)
tb.sendline("GET / HTTP/1.1")
tb.sendline("Host: dttw.tech")
tb.sendline()
tb.recvuntil(/Set-Cookie:/)
console.log(tb.recvline().toString())
tb.close()__cfduid=d52a14e65a3e064092b72565297ee1bbc1460755116; expires=Sat, 15-Apr-17 21:18:36 GMT; path=/; domain=.dttw.tech; HttpOnlySSH
s = new hakkit.spawn.ssh.cmd( {host: "unix.andrew.cmu.edu", user: "zwade" }, "cat", ["~/flag.txt"])
var tb = new hakkit.tube(s)
console.log(tb.recvline().toString())Password for zwade@unix.andrew.cmu.edu -
**********
flage{mush_flage_good_job}