Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

To claim this, I am signing this object:

{"name": "DORMANT RULE TEST",
"author": "bcoles,xntrik",
"browser": ["FF", "C"],
"browser_version": "ALL",
"os": "ALL",
"os_version": "ALL",
"modules": [
{"name": "ping_sweep",
"condition": null,
"code": "var s=outer_sequential_mod_output.split('.');var start = s[0]+'.'+s[1]+'.'+s[2]+'.117'; var end = s[0]+'.'+s[1]+'.'+s[2]+'.120'; var mod_input = start+'-'+end;",
@xntrik
xntrik / dormant dom notes - wip hacky stuff.js
Created August 6, 2017 03:20
notes on the BeEF dormant domination work
var ping_sweep_68a01c7d83 = function(mod_input){
beef.execute(function() {
var ips = new Array();
var rhosts = mod_input;
var threads = parseInt("6", 10) || 3;
var timeout = 1000;
if(!beef.browser.hasCors()) {
beef.aredormanthelpers.queue('/command/ping_sweep.js', 1, 'fail=Browser does not support CORS', beef.are.status_error());
{
"modules": [
{"name": "get_internal_ip_webrtc",
"condition": null,
"code": null,
"options": {}
},
{"name": "internal_network_fingerprinting",
"condition": "status==1",
"code": "var s=get_internal_ip_webrtc_mod_output.split('.');var start=parseInt(s[3])-1;var end=parseInt(s[3])+1;var mod_input = s[0]+'.'+s[1]+'.'+s[2]+'.'+start+'-'+s[0]+'.'+s[1]+'.'+s[2]+'.'+end;",
@xntrik
xntrik / .block
Last active July 18, 2017 22:40 — forked from varun-raj/.block
Interactive Gantt Chart
border: no
@xntrik
xntrik / aws-manage.sh
Last active December 10, 2018 04:58
A simple script to start an AWS EC2 instance and update an associated R53 DNS record. The policy files should setup minimum permissions to allow these actions.
#!/bin/bash
# Dependencies: awscli - see https://aws.amazon.com/cli/
# Some of this is pilfered from
# https://github.com/awslabs/aws-codedeploy-samples
#
# How to use:
# ./aws-manage.sh <instance id> <dns-record> <dns-type> <up|down>
#
# For example:
# ./aws-manage.sh i-7337 xntrik.wtf A up
Most of the logic resides in https://github.com/beefproject/beef/tree/master/core/main/client
https://github.com/beefproject/beef/blob/master/core/main/client/beef.js establishes the beef object in the browser's DOM
window.onload then runs beef_init() https://github.com/beefproject/beef/blob/master/core/main/client/init.js#L24
Within beef_init() we run beef.net.browser_details() https://github.com/beefproject/beef/blob/master/core/main/client/init.js#L67
Within beef.net.browser_details() we gather response from beef.browser.getDetails() https://github.com/beefproject/beef/blob/master/core/main/client/net.js#L503
@xntrik
xntrik / beef-integration-zsh-steps
Created November 27, 2015 17:50
Getting @beefproject 0.4.6.1-alpha to 100% full integration test from fresh chruby 2.2.3p173 on OSX
~/beef/beef2015nov ± gem list
*** LOCAL GEMS ***
bigdecimal (1.2.6)
io-console (0.4.3)
json (1.8.1)
psych (2.0.8)
rake (10.4.2)
rdoc (4.2.0)
~/beef/beef2015jun ± rake integration
Starting BeEF (wait a few seconds).....................
export DISPLAY=:0; cd test/integration;ruby -W0 ts_integration.rb
Loaded suite BeEF Integration Test Suite
Started
...E
===============================================================================================================================================================================================================================
Error: test_hooking_browser(TC_Login): Capybara::Ambiguous: Ambiguous match, found 3 elements matching link or button "127.0.0.1"
/Users/xian/.rvm/gems/ruby-2.2.1@beef/gems/capybara-2.4.4/lib/capybara/node/finders.rb:38:in `block in find'
/Users/xian/.rvm/gems/ruby-2.2.1@beef/gems/capybara-2.4.4/lib/capybara/node/base.rb:84:in `synchronize'