honeycomb 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +2 -2
- data/VERSION +1 -1
- data/etc/config.yml.example +5 -5
- data/lib/honeycomb/database.rb +19 -0
- data/lib/honeycomb/database/interact.rb +5 -5
- data/lib/honeycomb/default_setup.rb +6 -3
- data/lib/honeycomb/honeypot.rb +19 -0
- data/lib/honeycomb/honeypot/manage.rb +2 -2
- data/lib/honeycomb/model.rb +4 -2
- data/lib/honeycomb/model/connections.rb +2 -3
- data/lib/honeycomb/model/dcerpcbinds.rb +2 -1
- data/lib/honeycomb/model/dcerpcrequests.rb +2 -1
- data/lib/honeycomb/model/dcerpcserviceops.rb +2 -1
- data/lib/honeycomb/model/dcerpcservices.rb +2 -1
- data/lib/honeycomb/model/downloads.rb +2 -1
- data/lib/honeycomb/model/emu_profiles.rb +2 -1
- data/lib/honeycomb/model/emu_services.rb +2 -1
- data/lib/honeycomb/model/logins.rb +2 -1
- data/lib/honeycomb/model/mssql_commands.rb +2 -1
- data/lib/honeycomb/model/mssql_fingerprints.rb +2 -1
- data/lib/honeycomb/model/offers.rb +2 -1
- data/lib/honeycomb/model/p0fs.rb +2 -1
- data/lib/honeycomb/model/resolves.rb +2 -1
- data/lib/honeycomb/model/virustotals.rb +2 -1
- data/lib/honeycomb/model/virustotalscans.rb +2 -1
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -22,7 +22,7 @@ http://dionaea.carnivore.it/
|
|
22
22
|
|
23
23
|
require 'honeycomb'
|
24
24
|
|
25
|
-
all_pots = Honeycomb::
|
25
|
+
all_pots = Honeycomb::Honeypot::Manage.new
|
26
26
|
|
27
27
|
all_pots.check_diskspace
|
28
28
|
|
@@ -31,7 +31,7 @@ http://dionaea.carnivore.it/
|
|
31
31
|
|
32
32
|
require 'honeycomb'
|
33
33
|
|
34
|
-
all_pots = Honeycomb::Interact.new
|
34
|
+
all_pots = Honeycomb::Database::Interact.new
|
35
35
|
|
36
36
|
all_pots.all{Honeycomb::Download.all(:download_md5_hash => "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")}
|
37
37
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
data/etc/config.yml.example
CHANGED
@@ -2,10 +2,10 @@ honey_config:
|
|
2
2
|
servers: ['honeypot1', 'honeypot2']
|
3
3
|
username: 'r00t'
|
4
4
|
key: 'path/to/key'
|
5
|
-
password: 'sekret'
|
5
|
+
password: 'sekret' # Not used at the moment, need to implement
|
6
6
|
path: 'path/to/dionaea'
|
7
7
|
# Uncomment to following to change default directory of
|
8
|
-
# honeycomb/data/binaries
|
9
|
-
# honeycomb/data/logsql
|
10
|
-
#download_binaries: 'where/to/store/binaries'
|
11
|
-
#download_databases: 'where/to/store/databases'
|
8
|
+
# download_binaries - install_path/honeycomb/data/binaries
|
9
|
+
# download_databases - install_path/honeycomb/data/logsql
|
10
|
+
#download_binaries: '/where/to/store/binaries/'
|
11
|
+
#download_databases: '/where/to/store/databases/'
|
data/lib/honeycomb/database.rb
CHANGED
@@ -1 +1,20 @@
|
|
1
|
+
# honeycomb - Tool to manage and analyze data from the Dionaea Honeypot
|
2
|
+
# Project
|
3
|
+
# Josh Grunzweig
|
4
|
+
# Copyright (C) 2011 Trustwave Holdings
|
5
|
+
#
|
6
|
+
# This program is free software: you can redistribute it and/or modify it
|
7
|
+
# under the terms of the GNU General Public License as published by the
|
8
|
+
# Free Software Foundation, either version 3 of the License, or (at your
|
9
|
+
# option) any later version.
|
10
|
+
#
|
11
|
+
# This program is distributed in the hope that it will be useful, but
|
12
|
+
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
13
|
+
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
14
|
+
# for more details.
|
15
|
+
#
|
16
|
+
# You should have received a copy of the GNU General Public License along
|
17
|
+
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
18
|
+
#
|
19
|
+
|
1
20
|
require 'honeycomb/database/interact'
|
@@ -26,9 +26,9 @@ module Honeycomb
|
|
26
26
|
def all(&block)
|
27
27
|
all_values = []
|
28
28
|
::DataMapper::Repository.adapters.each do |repo|
|
29
|
-
if repo[0] == :default
|
30
|
-
|
31
|
-
|
29
|
+
next if repo[0] == :default
|
30
|
+
next if repo[0] == :"0"
|
31
|
+
|
32
32
|
begin
|
33
33
|
response = DataMapper.repository(repo[0]) {yield}
|
34
34
|
if response.kind_of?(DataMapper::Collection)
|
@@ -39,7 +39,7 @@ module Honeycomb
|
|
39
39
|
all_values << response if response
|
40
40
|
end
|
41
41
|
rescue Exception => e
|
42
|
-
#
|
42
|
+
#p e.message
|
43
43
|
end
|
44
44
|
end
|
45
45
|
all_values
|
@@ -58,7 +58,7 @@ module Honeycomb
|
|
58
58
|
all_values << response if response
|
59
59
|
end
|
60
60
|
rescue Exception => e
|
61
|
-
#
|
61
|
+
#p e.message
|
62
62
|
end
|
63
63
|
all_values
|
64
64
|
end
|
@@ -18,8 +18,11 @@
|
|
18
18
|
#
|
19
19
|
|
20
20
|
require 'honeycomb'
|
21
|
-
require 'honeycomb/model'
|
22
21
|
|
23
|
-
Honeycomb::Env
|
24
|
-
Honeycomb::Model.setup!
|
22
|
+
if Honeycomb::Env::CONFIG["honey_config"]["download_databases"]
|
23
|
+
Honeycomb::Model.setup!(Honeycomb::Env::CONFIG["honey_config"]["download_databases"])
|
24
|
+
else
|
25
|
+
Honeycomb::Model.setup!
|
26
|
+
end
|
27
|
+
|
25
28
|
|
data/lib/honeycomb/honeypot.rb
CHANGED
@@ -1 +1,20 @@
|
|
1
|
+
# honeycomb - Tool to manage and analyze data from the Dionaea Honeypot
|
2
|
+
# Project
|
3
|
+
# Josh Grunzweig
|
4
|
+
# Copyright (C) 2011 Trustwave Holdings
|
5
|
+
#
|
6
|
+
# This program is free software: you can redistribute it and/or modify it
|
7
|
+
# under the terms of the GNU General Public License as published by the
|
8
|
+
# Free Software Foundation, either version 3 of the License, or (at your
|
9
|
+
# option) any later version.
|
10
|
+
#
|
11
|
+
# This program is distributed in the hope that it will be useful, but
|
12
|
+
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
13
|
+
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
14
|
+
# for more details.
|
15
|
+
#
|
16
|
+
# You should have received a copy of the GNU General Public License along
|
17
|
+
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
18
|
+
#
|
19
|
+
|
1
20
|
require 'honeycomb/honeypot/manage'
|
@@ -41,10 +41,10 @@ module Honeycomb
|
|
41
41
|
# installation instructions: /opt/dionaea)
|
42
42
|
def initialize(db_path = nil, bin_path = nil, username = nil, key = nil,
|
43
43
|
servers = nil, base_path = nil)
|
44
|
-
self.db_path = Honeycomb::Env::CONFIG[
|
44
|
+
self.db_path = Honeycomb::Env::CONFIG["honey_config"]["download_databases"] ||
|
45
45
|
self.db_path = Pathname.new(__FILE__).dirname.dirname.dirname.dirname.expand_path.join('data').join('logsql/').to_s ||
|
46
46
|
db_path
|
47
|
-
self.bin_path = Honeycomb::Env::CONFIG[
|
47
|
+
self.bin_path = Honeycomb::Env::CONFIG["honey_config"]["download_binaries"] ||
|
48
48
|
self.bin_path = Pathname.new(__FILE__).dirname.dirname.dirname.dirname.expand_path.join('data').join('binaries/').to_s ||
|
49
49
|
bin_path
|
50
50
|
self.username = Honeycomb::Env::CONFIG["honey_config"]["username"] ||
|
data/lib/honeycomb/model.rb
CHANGED
@@ -36,6 +36,8 @@ module Honeycomb
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
+
Honeycomb::Env.read_config
|
40
|
+
|
39
41
|
require 'honeycomb/model/connections'
|
40
42
|
require 'honeycomb/model/logins'
|
41
43
|
require 'honeycomb/model/dcerpcbinds'
|
@@ -63,11 +65,11 @@ module Honeycomb
|
|
63
65
|
# Sets up the model using with the currently configured db_conn
|
64
66
|
# configuration.
|
65
67
|
def self.setup!(dir = Pathname.new(__FILE__).dirname.dirname.dirname.expand_path.join('data').join('logsql/').to_s)
|
66
|
-
num =
|
68
|
+
num = 0
|
67
69
|
# Don't plan on ever using the default database, but DataMapper complains
|
68
70
|
# if you don't specify one. A necessary evil.
|
69
71
|
DataMapper.setup(:default, "sqlite:///#{dir}honeypot.sqlite")
|
70
|
-
self.all_databases.each do |database|
|
72
|
+
self.all_databases(dir).each do |database|
|
71
73
|
DataMapper.setup(num.to_s.to_sym, "sqlite:///#{dir}#{database}")
|
72
74
|
num = num + 1
|
73
75
|
end
|
@@ -17,14 +17,13 @@
|
|
17
17
|
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
18
18
|
#
|
19
19
|
|
20
|
-
require 'honeycomb/model'
|
21
|
-
|
22
20
|
module Honeycomb
|
23
21
|
class Connections
|
24
22
|
include DataMapper::Resource
|
25
23
|
include Model::FixtureTable
|
26
24
|
|
27
|
-
def self.all_databases(dir =
|
25
|
+
def self.all_databases(dir = Honeycomb::Env::CONFIG["honey_config"]["download_databases"] ||
|
26
|
+
Pathname.new(__FILE__).dirname.dirname.dirname.dirname.expand_path.join('data').join('logsql/').to_s)
|
28
27
|
ret = Dir.entries(dir)
|
29
28
|
ret.delete_if {|x| x =~ /^\./}
|
30
29
|
ret
|
@@ -22,7 +22,8 @@ module Honeycomb
|
|
22
22
|
include DataMapper::Resource
|
23
23
|
include Model::FixtureTable
|
24
24
|
|
25
|
-
def self.all_databases(dir =
|
25
|
+
def self.all_databases(dir = Honeycomb::Env::CONFIG["honey_config"]["download_databases"] ||
|
26
|
+
Pathname.new(__FILE__).dirname.dirname.dirname.dirname.expand_path.join('data').join('logsql/').to_s)
|
26
27
|
ret = Dir.entries(dir)
|
27
28
|
ret.delete_if {|x| x =~ /^\./}
|
28
29
|
ret
|
@@ -22,7 +22,8 @@ module Honeycomb
|
|
22
22
|
include DataMapper::Resource
|
23
23
|
include Model::FixtureTable
|
24
24
|
|
25
|
-
def self.all_databases(dir =
|
25
|
+
def self.all_databases(dir = Honeycomb::Env::CONFIG["honey_config"]["download_databases"] ||
|
26
|
+
Pathname.new(__FILE__).dirname.dirname.dirname.dirname.expand_path.join('data').join('logsql/').to_s)
|
26
27
|
ret = Dir.entries(dir)
|
27
28
|
ret.delete_if {|x| x =~ /^\./}
|
28
29
|
ret
|
@@ -22,7 +22,8 @@ module Honeycomb
|
|
22
22
|
include DataMapper::Resource
|
23
23
|
include Model::FixtureTable
|
24
24
|
|
25
|
-
def self.all_databases(dir =
|
25
|
+
def self.all_databases(dir = Honeycomb::Env::CONFIG["honey_config"]["download_databases"] ||
|
26
|
+
Pathname.new(__FILE__).dirname.dirname.dirname.dirname.expand_path.join('data').join('logsql/').to_s)
|
26
27
|
ret = Dir.entries(dir)
|
27
28
|
ret.delete_if {|x| x =~ /^\./}
|
28
29
|
ret
|
@@ -22,7 +22,8 @@ module Honeycomb
|
|
22
22
|
include DataMapper::Resource
|
23
23
|
include Model::FixtureTable
|
24
24
|
|
25
|
-
def self.all_databases(dir =
|
25
|
+
def self.all_databases(dir = Honeycomb::Env::CONFIG["honey_config"]["download_databases"] ||
|
26
|
+
Pathname.new(__FILE__).dirname.dirname.dirname.dirname.expand_path.join('data').join('logsql/').to_s)
|
26
27
|
ret = Dir.entries(dir)
|
27
28
|
ret.delete_if {|x| x =~ /^\./}
|
28
29
|
ret
|
@@ -22,7 +22,8 @@ module Honeycomb
|
|
22
22
|
include DataMapper::Resource
|
23
23
|
include Model::FixtureTable
|
24
24
|
|
25
|
-
def self.all_databases(dir =
|
25
|
+
def self.all_databases(dir = Honeycomb::Env::CONFIG["honey_config"]["download_databases"] ||
|
26
|
+
Pathname.new(__FILE__).dirname.dirname.dirname.dirname.expand_path.join('data').join('logsql/').to_s)
|
26
27
|
ret = Dir.entries(dir)
|
27
28
|
ret.delete_if {|x| x =~ /^\./}
|
28
29
|
ret
|
@@ -22,7 +22,8 @@ module Honeycomb
|
|
22
22
|
include DataMapper::Resource
|
23
23
|
include Model::FixtureTable
|
24
24
|
|
25
|
-
def self.all_databases(dir =
|
25
|
+
def self.all_databases(dir = Honeycomb::Env::CONFIG["honey_config"]["download_databases"] ||
|
26
|
+
Pathname.new(__FILE__).dirname.dirname.dirname.dirname.expand_path.join('data').join('logsql/').to_s)
|
26
27
|
ret = Dir.entries(dir)
|
27
28
|
ret.delete_if {|x| x =~ /^\./}
|
28
29
|
ret
|
@@ -22,7 +22,8 @@ module Honeycomb
|
|
22
22
|
include DataMapper::Resource
|
23
23
|
include Model::FixtureTable
|
24
24
|
|
25
|
-
def self.all_databases(dir =
|
25
|
+
def self.all_databases(dir = Honeycomb::Env::CONFIG["honey_config"]["download_databases"] ||
|
26
|
+
Pathname.new(__FILE__).dirname.dirname.dirname.dirname.expand_path.join('data').join('logsql/').to_s)
|
26
27
|
ret = Dir.entries(dir)
|
27
28
|
ret.delete_if {|x| x =~ /^\./}
|
28
29
|
ret
|
@@ -22,7 +22,8 @@ module Honeycomb
|
|
22
22
|
include DataMapper::Resource
|
23
23
|
include Model::FixtureTable
|
24
24
|
|
25
|
-
def self.all_databases(dir =
|
25
|
+
def self.all_databases(dir = Honeycomb::Env::CONFIG["honey_config"]["download_databases"] ||
|
26
|
+
Pathname.new(__FILE__).dirname.dirname.dirname.dirname.expand_path.join('data').join('logsql/').to_s)
|
26
27
|
ret = Dir.entries(dir)
|
27
28
|
ret.delete_if {|x| x =~ /^\./}
|
28
29
|
ret
|
@@ -22,7 +22,8 @@ module Honeycomb
|
|
22
22
|
include DataMapper::Resource
|
23
23
|
include Model::FixtureTable
|
24
24
|
|
25
|
-
def self.all_databases(dir =
|
25
|
+
def self.all_databases(dir = Honeycomb::Env::CONFIG["honey_config"]["download_databases"] ||
|
26
|
+
Pathname.new(__FILE__).dirname.dirname.dirname.dirname.expand_path.join('data').join('logsql/').to_s)
|
26
27
|
ret = Dir.entries(dir)
|
27
28
|
ret.delete_if {|x| x =~ /^\./}
|
28
29
|
ret
|
@@ -22,7 +22,8 @@ module Honeycomb
|
|
22
22
|
include DataMapper::Resource
|
23
23
|
include Model::FixtureTable
|
24
24
|
|
25
|
-
def self.all_databases(dir =
|
25
|
+
def self.all_databases(dir = Honeycomb::Env::CONFIG["honey_config"]["download_databases"] ||
|
26
|
+
Pathname.new(__FILE__).dirname.dirname.dirname.dirname.expand_path.join('data').join('logsql/').to_s)
|
26
27
|
ret = Dir.entries(dir)
|
27
28
|
ret.delete_if {|x| x =~ /^\./}
|
28
29
|
ret
|
@@ -22,7 +22,8 @@ module Honeycomb
|
|
22
22
|
include DataMapper::Resource
|
23
23
|
include Model::FixtureTable
|
24
24
|
|
25
|
-
def self.all_databases(dir =
|
25
|
+
def self.all_databases(dir = Honeycomb::Env::CONFIG["honey_config"]["download_databases"] ||
|
26
|
+
Pathname.new(__FILE__).dirname.dirname.dirname.dirname.expand_path.join('data').join('logsql/').to_s)
|
26
27
|
ret = Dir.entries(dir)
|
27
28
|
ret.delete_if {|x| x =~ /^\./}
|
28
29
|
ret
|
data/lib/honeycomb/model/p0fs.rb
CHANGED
@@ -22,7 +22,8 @@ module Honeycomb
|
|
22
22
|
include DataMapper::Resource
|
23
23
|
include Model::FixtureTable
|
24
24
|
|
25
|
-
def self.all_databases(dir =
|
25
|
+
def self.all_databases(dir = Honeycomb::Env::CONFIG["honey_config"]["download_databases"] ||
|
26
|
+
Pathname.new(__FILE__).dirname.dirname.dirname.dirname.expand_path.join('data').join('logsql/').to_s)
|
26
27
|
ret = Dir.entries(dir)
|
27
28
|
ret.delete_if {|x| x =~ /^\./}
|
28
29
|
ret
|
@@ -22,7 +22,8 @@ module Honeycomb
|
|
22
22
|
include DataMapper::Resource
|
23
23
|
include Model::FixtureTable
|
24
24
|
|
25
|
-
def self.all_databases(dir =
|
25
|
+
def self.all_databases(dir = Honeycomb::Env::CONFIG["honey_config"]["download_databases"] ||
|
26
|
+
Pathname.new(__FILE__).dirname.dirname.dirname.dirname.expand_path.join('data').join('logsql/').to_s)
|
26
27
|
ret = Dir.entries(dir)
|
27
28
|
ret.delete_if {|x| x =~ /^\./}
|
28
29
|
ret
|
@@ -22,7 +22,8 @@ module Honeycomb
|
|
22
22
|
include DataMapper::Resource
|
23
23
|
include Model::FixtureTable
|
24
24
|
|
25
|
-
def self.all_databases(dir =
|
25
|
+
def self.all_databases(dir = Honeycomb::Env::CONFIG["honey_config"]["download_databases"] ||
|
26
|
+
Pathname.new(__FILE__).dirname.dirname.dirname.dirname.expand_path.join('data').join('logsql/').to_s)
|
26
27
|
ret = Dir.entries(dir)
|
27
28
|
ret.delete_if {|x| x =~ /^\./}
|
28
29
|
ret
|
@@ -22,7 +22,8 @@ module Honeycomb
|
|
22
22
|
include DataMapper::Resource
|
23
23
|
include Model::FixtureTable
|
24
24
|
|
25
|
-
def self.all_databases(dir =
|
25
|
+
def self.all_databases(dir = Honeycomb::Env::CONFIG["honey_config"]["download_databases"] ||
|
26
|
+
Pathname.new(__FILE__).dirname.dirname.dirname.dirname.expand_path.join('data').join('logsql/').to_s)
|
26
27
|
ret = Dir.entries(dir)
|
27
28
|
ret.delete_if {|x| x =~ /^\./}
|
28
29
|
ret
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: honeycomb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Josh Grunzweig
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-07-
|
13
|
+
date: 2011-07-15 00:00:00 -05:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -220,7 +220,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
220
220
|
requirements:
|
221
221
|
- - ">="
|
222
222
|
- !ruby/object:Gem::Version
|
223
|
-
hash:
|
223
|
+
hash: -293782617342564056
|
224
224
|
segments:
|
225
225
|
- 0
|
226
226
|
version: "0"
|