Skip to content

Commit 3326f4b

Browse files
authored
Merge pull request #122 from rocknsm/devel
ROCK 2.0 (1703) Final Release
2 parents bc9c14a + 698ac6e commit 3326f4b

71 files changed

Lines changed: 6263 additions & 60 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
1-
tmp/
1+
*#
2+
*.iso
3+
*.pcap
4+
*.retry
5+
*.un~
6+
*~
7+
.#*
8+
.*.sw[a-z]
9+
.DS_Store
10+
.bundle/*
11+
.kitchen
12+
.kitchen.local.yml
13+
.kitchen/
214
.vagrant
15+
/cookbooks
16+
Berksfile.lock
17+
Gemfile.lock
318
Vagrantfile.vmware
4-
*.pcap
19+
\#*#
20+
pkg/
21+
repo/
22+
tmp/

README.md

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,35 @@
11
## Response Operation Collections Kit Reference Build
22

3-
This build was created and tested using CentOS 7.2. I pretty much guarantee that it won't work with anything else other than RHEL 7. Unless you have an operational need, I would suggest basing your system off of CentOS 7.2 (build 1511), as that is where the bulk of the testing of this has happened.
3+
See the [ROCK 2.0 User Guide](https://rocknsm.gitbooks.io/rocknsm-guide/content/).
4+
5+
6+
This build was created and tested using CentOS 7.3. I pretty much guarantee that it won't work with anything else other than RHEL 7. Unless you have an operational need, I would suggest basing your system off of CentOS 7.3 (build 1611), as that is where the bulk of the testing of this has happened.
47

58
**BE ADVISED:** This build process takes 3-10 minutes depending on your underlying hardware. There will be times where it seems like it quit. Be patient. You'll know when it's done, for better or worse.
69

10+
### Differences in ROCK 2.0
11+
12+
See [Getting Started with ROCK 2.0](docs/guide/getting-started.adoc).
13+
714
### Vagrant
8-
**NOTE:**
15+
**NOTE:**
916
This Vagrantfile is configured to give the VM 8GB of RAM. If your system can't do that you should buy a new system or adjust the `vm.memory` value. Anything below 8 is going to run like poopoo. You will also need to have a host-only adapter configured named `vboxnet0`.
1017
```
11-
git clone https://github.com/CyberAnalyticDevTeam/SimpleRock.git
12-
cd SimpleRock
18+
git clone https://github.com/rocknsm/rock.git
19+
cd rock
1320
vagrant up
1421
```
1522

1623
### Physical/Virtual/Non-Vagrant
1724
**NOTE:**
18-
The system you run this on should have at least 2 network interfaces and more than 4GB of RAM, with an OS (RHEL or CentOS 7) already installed.
25+
The system you run this on should have at least 2 network interfaces and more than 8GB of RAM, with an OS (RHEL or CentOS 7) already installed.
1926
```
20-
yum update -y && reboot
21-
sudo rpm -Uvh https://packages.chef.io/stable/el/7/chef-12.9.38-1.el7.x86_64.rpm
22-
sudo yum install git -y
23-
git clone https://github.com/CyberAnalyticDevTeam/SimpleRock.git
24-
cd SimpleRock
25-
sudo chef-client -z -r "recipe[simplerock]"
27+
sudo yum update -y && reboot
28+
sudo yum install -y epel-release
29+
sudo yum install -y git ansible
30+
git clone https://github.com/rocknsm/rock.git
31+
cd rock/ansible
32+
sudo ./deploy_rock.sh
2633
```
2734

2835
## Minimum Hardware Recommendations
@@ -39,7 +46,6 @@ sudo chef-client -z -r "recipe[simplerock]"
3946
* Network
4047
* The system needs at least 2 network interfaces, one for management and one for collection.
4148

42-
4349
**GOLDEN RULE:** If you throw hardware at it, ROCK will use it. It will require some tuning to do so, but we'll be documenting that soon enough.
4450

4551
## Usage
@@ -159,25 +165,21 @@ sudo netstat -planet | grep node
159165

160166
IPADDRESS = The management interface of the box, or "localhost" if you did the vagrant build.
161167

162-
http://IPADDRESS - Kibana & Marvel
163-
164-
http://IPADDRESS/_plugin/hq - Elastic HQ (To watch the health of elasticsearch.)
168+
http://IPADDRESS - Kibana
165169

166-
http://IPADDRESS/_plugin/sql - Query your ES data with SQL.
167-
**NOTE:** When using the elasticsearch-sql plugin, you must set the address of your ES node in the upper right to `http://IPADDRESS:9200/`.
168170

169171
## Full Packet Capture
170172

171173
Google's Stenographer is installed and configured in this build. However, it is disabled by default. There are a few reasons for this: First, it can be too much for Vagrant builds on meager hardware. Second, you really need to make sure you've mounted /data over sufficient storage before you start saving full packets. Once you're ready to get nuts, enable and start the service with `systemctl enable stenographer.service` and then `systemctl start stenographer.service`. Stenographer is already stubbed into the `/usr/local/bin/rock_{start,stop,status}` scripts, you just need to uncomment it if you're going to use it.
172174

173175
## THANKS
174176

175-
This architecture is made possible by the efforts of the Missouri National Guard Cyber Team, and especially Critical Stack and BroEZ for donating talent and resources to further development.
177+
This architecture is made possible by the efforts of the Missouri National Guard Cyber Team for donating talent and resources to further development.
176178

177179

178180
## Approach
179-
180-
The Chef recipe that drives this build strives not to use external recipes and cookbooks where possible. The reasoning behind this is to make the simplerock recipe a "one-stop" reference for a manual build. This allows users to use the build process as a guide when doing larger scale production roll outs without having to decypher a labrynth of dependencies.
181+
182+
The Ansible playbook that drives this build strives not to use any external roles or other dependencies. The reasoning behind this is to make the rock playbook a "one-stop" reference for a manual build. This allows users to use the build process as a guide when doing larger scale production roll outs without having to decipher a labyrinth of dependencies.
181183

182184
Templated config files have comment sections added near key config items with useful info. They don't all have it, but they get added as remembered.
183185

TODO.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

Vagrantfile

Lines changed: 41 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,57 @@
22
# vi: set ft=ruby :
33

44
Vagrant.configure(2) do |config|
5-
#config.vm.box = "relativkreativ/centos-7-minimal"
6-
config.vm.box = "bento/centos-7.2"
5+
config.vm.box = "bento/centos-7.3"
6+
77
config.ssh.forward_agent = true
88
config.ssh.username = 'vagrant'
99
config.ssh.password = 'vagrant'
10-
config.vm.network "forwarded_port", guest: 5601, host: 5601
11-
config.vm.network "forwarded_port", guest: 9200, host: 9200
12-
config.vm.network "forwarded_port", guest: 80, host: 8080
10+
11+
12+
# Configure overall network interfaces
13+
#config.vm.network "public_network", bridge: "en4: Apple USB Ethernet Adapter", auto_config: false
14+
config.vm.network "public_network", bridge: "en0: Wi-Fi", auto_config: false
15+
#config.vm.network "private_network", auto_config: false
16+
1317
config.vm.provider "virtualbox" do |vb|
14-
vb.memory = 8192
18+
vb.memory = 8704
1519
vb.cpus = 4
1620
vb.customize ["modifyvm", :id, "--nic1", "nat"]
1721
vb.customize ["modifyvm", :id, "--nic2", "hostonly"]
1822
vb.customize ["modifyvm", :id, "--hostonlyadapter2", "vboxnet0"]
1923
vb.customize ["modifyvm", :id, "--nicpromisc2", "allow-vms"]
24+
25+
# Forward exposed service ports - these are directly accesible on vmware
26+
#config.vm.network "forwarded_port", guest: 80, host: 8000
2027
end
2128

22-
#config.vm.provision "shell", inline: <<-SHELL
23-
#hostnamectl set-hostname simplerockbuild.simplerock.lan
24-
#echo -e "127.0.0.2\tsimplerockbuild.simplerock.lan\tsimplerockbuild" >> /etc/hosts
25-
#SHELL
26-
27-
config.vm.provision "chef_solo" do |chef|
28-
chef.log_level = "info"
29-
#chef.version = "12.3.0"
30-
chef.cookbooks_path = "cookbooks" # path to your cookbooks
31-
#chef.roles_path = "roles"
32-
chef.add_recipe "simplerock"
33-
#chef.node_name = "simplerockbuild"
29+
config.vm.provider "vmware_fusion" do |v|
30+
v.vmx["memsize"] = 8704
31+
v.vmx["numvcpus"] = 8
32+
v.vmx["ethernet1.noPromisc"] = "false"
33+
v.vmx["ethernet2.noPromisc"] = "false"
34+
35+
# Ensure vmware-tools are auto-updated when we update the kernel
36+
config.vm.provision "shell", inline: <<-SHELL
37+
sed -i.bak 's/answer AUTO_KMODS_ENABLED_ANSWER no/answer AUTO_KMODS_ENABLED_ANSWER yes/g' /etc/vmware-tools/locations
38+
sed -i 's/answer AUTO_KMODS_ENABLED no/answer AUTO_KMODS_ENABLED yes/g' /etc/vmware-tools/locations
39+
SHELL
3440
end
41+
42+
# ansible required for ROCK 2.0 deployment
43+
# git required to clone ROCK repo
44+
# vim & tmux because of my sanity
45+
config.vm.provision "shell", inline: <<-SHELL
46+
yum -y install epel-release
47+
sed -i 's/^mirrorlist/#mirrorlist/; s/^#baseurl/baseurl/' /etc/yum.repos.d/{CentOS-Base.repo,epel.repo}
48+
yum -y update
49+
yum -y install ansible vim git tmux
50+
SHELL
51+
52+
# Enable selinux
53+
config.vm.provision "shell", inline: <<-SHELL
54+
sed -i 's/^SELINUX=.*/SELINUX=enforcing/' /etc/selinux/config
55+
setenforce 1
56+
SHELL
57+
3558
end

0 commit comments

Comments
 (0)