文档章节

Cyber Security GeoIP Attack Map

BaiyuanLab
 BaiyuanLab
发布于 2017/11/17 21:40
字数 675
阅读 22
收藏 0

First and Foremost

I do not have much time in my life right now to maintain this project. I undertook this challenge as a means to learn JavaScript, and to improve upon the Python I already knew. I'm sure there are several things I could have done differently in my implementation, and I won't be offended if I receive constructive criticism from someone who downloads and views my code. I know I learned a ton when working on this, and I hope the open source community will continue to teach me things :)

Cyber Security GeoIP Attack Map Visualization

This geoip attack map visualizer was developed to display network attacks on your organization in real time. The data server follows a syslog file, and parses out source IP, destination IP, source port, and destination port. Protocols are determined via common ports, and the visualizations vary in color based on protocol type. CLICK HERE for a demo video. This project would not be possible if it weren't for Sam Cappella, who created a cyber defense competition network traffic visualizer for the 2015 Palmetto Cyber Defense Competition. I mainly used his code as a reference, but I did borrow a few functions while creating the display server, and visual aspects of the webapp. I would also like to give special thanks to Dylan Madisetti as well for giving me advice about certain aspects of my implementation.

Important

This program relies entirely on syslog, and because all appliances format logs differently, you will need to customize the log parsing function(s). If your organization uses a security information and event management system (SIEM), it can probably normalize logs to save you a ton of time writing regex.

  1. Send all syslog to SIEM.
  2. Use SIEM to normalize logs.
  3. Send normalized logs to the box (any Linux machine running syslog-ng will work) running this software so the data server can parse them.

Configs

  1. Make sure in /etc/redis/redis.conf to change bind 127.0.0.1 to bind 0.0.0.0 if you plan on running the DataServer on a different machine than the AttackMapServer.
  2. Make sure that the WebSocket address in /AttackMapServer/index.html points back to the IP address of the AttackMapServer so the browser knows the address of the WebSocket.
  3. Download the MaxMind GeoLite2 database, and change the db_path variable in DataServer.py to the wherever you store the database.
    • ./db-dl.sh
  4. Add headquarters latitude/longitude to hqLatLng variable in index.html
  5. Use syslog-gen.py, or syslog-gen.sh to simulate dummy traffic "out of the box."
  6. IMPORTANT: Remember, this code will only run correctly in a production environment after personalizing the parsing functions. The default parsing function is only written to parse ./syslog-gen.sh traffic.

Bugs, Feedback, and Questions

If you find any errors or bugs, please let me know. Questions and feedback are also welcome, and can be sent to mcmay.web@gmail.com, or open an issue in this repository.

Deploy example

Tested on Ubuntu 16.04 LTS.

  • Clone the application:

    git clone https://github.com/matthewclarkmay/geoip-attack-map.git
  • Install system dependencies:

    sudo apt install python3-pip redis-server
  • Install python requirements:

    cd geoip-attack-map
    sudo pip3 install -U -r requirements.txt
  • Start Redis Server:

    redis-server
  • Configure the Data Server DB:

    cd DataServerDB
    ./db-dl.sh
    cd ..
  • Start the Data Server:

    cd DataServer
    sudo python3 DataServer.py
  • Start the Syslog Gen Script, inside DataServer directory:

    • Open a new terminal tab (Ctrl+Shift+T, on Ubuntu).

      ./syslog-gen.py
      ./syslog-gen.sh
  • Configure the Attack Map Server, extract the flags to the right place:

    • Open a new terminal tab (Ctrl+Shift+T, on Ubuntu).

      cd AttackMapServer/
      unzip static/flags.zip
  • Start the Attack Map Server:

    sudo python3 AttackMapServer.py
  • Access the Attack Map Server from browser:

    • http://localhost:8888/ or http://127.0.0.1:8888/

    • To access via browser on another computer, use the external IP of the machine running the AttackMapServer.

    • Edit the IP Address in the file "/static/map.js" at "AttackMapServer" directory. From:

      var webSock = new WebSocket("ws:/127.0.0.1:8888/websocket");
    • To, for example:

      var webSock = new WebSocket("ws:/192.168.1.100:8888/websocket");
    • Restart the Attack Map Server:

      sudo python3 AttackMapServer.py
    • On the other computer, points the browser to:

      http://192.168.1.100:8888/

本文转载自:https://securityonline.info/geoip-attack-map-cyber-security-geoip-attack-map/

共有 人打赏支持
BaiyuanLab
粉丝 4
博文 13
码字总数 1888
作品 0
台北
私信 提问
28C3: New attacks on GSM mobiles and security m...

At the 28th Chaos Communication Congress (28C3) in Berlin, security researchers have demonstrated a new technique for attacking GSM mobile phones. Karsten Nohl from Security Res......

linuxhunter
2011/12/29
0
0
Security Is No Excuse for Bad Performance

These days, no matter what task you're trying to accomplish within your online properties, chances are there's at least one cloud solution that provides it. However, with so muc......

Craig Lowell
2017/12/09
0
0
2017中国汽车网络安全国际峰会

2017中国汽车网络安全国际峰会 The China Vehicles Cyber Security Summit 2017 “2017中国汽车网络安全国际峰会”将于2017年11月9日至10日于上海圣诺亚皇冠假日酒店隆重举行。本次会议由上海...

ECV-International
2017/09/11
0
0
2018 Security Predictions (Part 1)

Given how fast technology is changing, we thought it would be interesting to ask IT executives to share their thoughts on the biggest surprises in 2017 and their predictions for......

Tom Smith
2017/12/11
0
0
AWStats 7.0 Beta 发布,Web访问统计

首先,这个版本是在半个月前发布的。目前还是 Beta 测试阶段,而最新的稳定版本是 6.95。 7.0 Beta 版本的改进记录: 新功能和改进: - Detect Windows 7. - Can format numbers according t...

鉴客
2010/06/13
822
0

没有更多内容

加载失败,请刷新页面

加载更多

OSChina 周日乱弹 —— 做一只舔狗,开心时就去舔她,不开心时就舔自己

Osc乱弹歌单(2019)请戳(这里) 【今日歌曲】 @温家成 :分享连诗雅的单曲《水星逆行》 《水星逆行》- 连诗雅 手机党少年们想听歌,请使劲儿戳(这里) @罗马的王 :在家嫌猫吵,去书城看书...

小小编辑
23分钟前
13
2
Ruby中的继承、原型、面向对象、访问域

先有类还是先有对象 从鸡蛋悖论解决可以悟到一个道理,不要从常识上假设非此即彼和绝对静止。 Ruby中的类和对象正是这么个东西 我们创建一个类,那它就是Class这个对象的实例,而Class,于是...

可数局部基
今天
4
0
什么时候使用字节流、什么时候使用字符流,二者的区别

在程序中所有的数据都是以流的方式进行传输或保存的,程序需要数据的时候要使用输入流读取数据,而当程序需要将一些数据保存起来的时候,就要使用输出流完成。 InputStream 和OutputStream,...

watermelon11
今天
6
0
Alpakka Kafka,反应式Kafka客户端

Alpakka Kafka 是一个要用于 Java 和 Scala 语言的开源的流感知和反应式集成数据线项目。它建立在 Akka Stream之上,提供了 DSL 来支持反应式和流式编程,内置回压功能。Akka Streams 是 Re...

羊八井
今天
5
0
PHP7源码编译安装详解

$ yum groupinstall "development tools"$ yum install -y gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype \freetype-devel libpng libpng-devel libxml2 ......

问题终结者
今天
5
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部