Skip to content

Commit

Permalink
added drill_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
hrbrmstr committed Jan 17, 2015
1 parent b44b182 commit 20cc540
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,19 @@

(a collaborative effort by @alexcpsec & @hrbrmstr)

Why should security vendors be the only ones allowed to use inane, animated visualizations to "compensate"? Now, **you** can have your very own IP attack map that's just as useful as everyone else's.
Why should security vendors be the only ones allowed to use silly, animated visualizations to "compensate"? Now, **you** can have your very own IP attack map that's just as useful as everyone else's.

IPew is a feature-rich, customizable D3 * javascript visualization, needing nothing more than a web server capable of serving static content and a sense of humor to operate. It's got all the standard features that are expected from it including:
IPew is a feature-rich, customizable D3 / javascript visualization, needing nothing more than a web server capable of serving static content and a sense of humor to operate. It's got all the standard features that are expected including:

- _Scary_ dark background!
- Source & destination country actor/victim attribution!
- Inane attack names!

BUT, it has one critical element missing from the others: **SOUND EFFECTS**! What good is a global cyberbattle without some cool sounds.
BUT, it has one critical element that is missing from the others: **SOUND EFFECTS**! What good is a global cyberbattle without some _cool_ sounds.

In all seriousness, IPew provides a simple framework - based on [Datamaps]() - for displaying cartographic data in a (mostly) responsive way and shows how to use dynamic data via javascript event timers and data queues.
In all seriousness, IPew provides a simple framework - based on [Datamaps](http://datamaps.github.io/) - for displaying cartographic attack data in a (mostly) responsive way and shows how to use dynamic data via javascript event timers and data queues (in case you're here to learn vs have fun - or both!).

You can customize the display through a myriad of query string options:

### Sounds
You can customize the display through a myriad of query string options, including _sounds_.

IPew includes the following sounds:

Expand All @@ -29,17 +27,21 @@ IPew includes the following sounds:
- `pew=1` - Somewhat disturbing human-made "pew-pew" sound
- `galaga=1` - Classic arcade sound!

To turn off sound effects (but, _why?_ :-), use `nofx=1` and to randomly cycle through them all use `allfx=1`
To turn off sound effects (but, but, _why?_ :-), use `nofx=1`, and to randomly cycle through them all use `allfx=1`

By default, IPew will use a statistical model for choosing source countries for the attacks, but you can level the playing field and set `random_mode=1` to give all countries the same cyber-advatage.

In similar vein, and using the perpsective many prominent security vendors and pundits seem to have, you can make all cyber attacks from from China with `china_mode=1`.
In similar vein, and using the perpsective many prominent security vendors and pundits seem to have, you can make all cyber attacks from from China with `china_mode=1` or from North Korea with `dprk_mode=1`.

IPew's default attack timing is based on observational data from many sources, but you can make it look like the world is on the brink of cyber collapse by setting `bad_day=1`.

Finally, you can proudly display your organization's name by setting `org_name=MyOrgName` (URL encode any spaces or special characters).

One of my personal favorites is [http://dds.ec/pewpew/index.html?china_mode=1&org_name=Mandiant&bad_day=1](http://dds.ec/pewpew/index.html?china_mode=1&org_name=Mandiant&bad_day=1).
### Drill Mode

We had an interesting request to be able to use IPew in a IR "drill" setting, so there's now a "drill mode" where you can specify a latitude & longitude to be the destination for the attacks. Right now, all attacks go there, but we may add an option to specify a percentage of attacks that should go there. You _must_ use `drill_mode=1&lat=##.####&lon=##.####` for this to work, like: `drill_mode=1&lat=43.2672&lon=-70.8617` (which would focus all attacks near @hrbrmstr). Remember, you can specify your organization name there, too.

One of my personal favorites is [http://ocularwarfare.com/ipew/index.html?china_mode=1&org_name=Mandiant&bad_day=1](http://ocularwarfare.com/ipew/index.html?china_mode=1&org_name=Mandiant&bad_day=1).

### Using IPew

Expand Down
18 changes: 14 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ <h3>About IPew</h3>
var pew = $.getUrlVar('pew');
var allfx = $.getUrlVar('allfx')
var galaga = $.getUrlVar('galaga')
var drill_mode = $.getUrlVar("drill_mode")
var in_lat = $.getUrlVar("lat")
var in_lon = $.getUrlVar("lon")


snd_id = "starwars" ;
if (typeof tng !== 'undefined') { snd_id = "tng" ; }
Expand Down Expand Up @@ -282,8 +286,8 @@ <h3>About IPew</h3>
//
// pretty simple setup ->
// * make base Datamap
// setup timers to add random events to a queue
// update the Datamap
// * setup timers to add random events to a queue
// * update the Datamap

var map = new Datamap({

Expand All @@ -300,7 +304,8 @@ <h3>About IPew</h3>
borderWidth: 0.75,
borderColor: '#4393c3',
popupTemplate: function(geography, data) {
return '<div class="hoverinfo" style="color:white;background:black">' + geography.properties.name + '</div>';
return '<div class="hoverinfo" style="color:white;background:black">' +
geography.properties.name + '</div>';
},
popupOnHover: true,
highlightOnHover: false,
Expand Down Expand Up @@ -413,13 +418,18 @@ <h3>About IPew</h3>
srclong = centers[center_id].LONG;
}

if (typeof drill_mode != 'undefined') {

dstlat = in_lat
dstlong = in_lon
}

hits.push( { origin : { latitude: +srclat, longitude: +srclong },
destination : { latitude: +dstlat, longitude: +dstlong } } );
map.arc(hits, {strokeWidth: 2, strokeColor: 'green'});

// add boom to the bubbles queue


boom.push( { radius: 7, latitude: +dstlat, longitude: +dstlong,
fillOpacity: 0.5, attk: which_attack} );
map.bubbles(boom, {
Expand Down

0 comments on commit 20cc540

Please sign in to comment.