rogue_one 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6967b5c72247d5e6709f0ba71a7402bd181ec8dec2bdc6caa8bd588a01c9d409
4
- data.tar.gz: 2a79181907673bb4c64b97fe706ce3a3d200260d71f361117f6b42d0fd3c4ba6
3
+ metadata.gz: 5655a9f8e6b835c1ae68a9f10dd449ac4558a9efc582a2e8a8292f60f33a5c78
4
+ data.tar.gz: f7c38f1d2eacdebf14f2aa9dfb89c99460a3c9ceaf4c707f63b38f0423933123
5
5
  SHA512:
6
- metadata.gz: 910aa8d5b1715407536204b63ac365006ff5ae0b7b09e51d42fcae4391a0be7cb1139f25c7131d3f14b386bb1e283f4be14a5b1d7a1b35a8fc01e18fbce21359
7
- data.tar.gz: c408c4cba8b1b170771adf46132357221db2c00100cfb0991f5547c386d299bbb129dd375609636bd426feae46a06c3dd91cdfdc73ba9528f453c665e471870e
6
+ metadata.gz: 04fe47430be7c6a7bf2211620516a4dff785d8bcb61ca378b9c382e2d1eb1c3f3babed665345e23ab0a023b8201d073e567a554393f7af61272179dab6e0be63
7
+ data.tar.gz: 698b1433133c836c10df144c65fd5e98663e48f8be07f6082960f8bc29eec74315a2e8b807dde47be5fdb8e42480d47e8ea30d21e2f01afbad7653ee6ac18895
data/.travis.yml CHANGED
@@ -4,4 +4,4 @@ language: ruby
4
4
  cache: bundler
5
5
  rvm:
6
6
  - 2.6
7
- before_install: gem install bundler -v 2.0.1
7
+ before_install: gem install bundler -v 2.1
data/README.md CHANGED
@@ -39,12 +39,16 @@ Usage:
39
39
  rogue_one report [DNS_SERVER]
40
40
 
41
41
  Options:
42
- [--custom-list=CUSTOM_LIST] # A path to a custom list of domains
43
- [--threshold=N] # Threshold value for determining malicious or not
42
+ [--default-list=DEFAULT_LIST] # A default list of top 100 domains (Alexa or Fortune)
43
+ # Default: alexa
44
+ [--custom-list=CUSTOM_LIST] # A path to a custom list of domains
45
+ [--threshold=N] # Threshold value for determining malicious or not
44
46
  [--verbose], [--no-verbose]
45
47
 
46
48
  Show a report of a given DNS server
47
49
 
50
+ Show a report of a given DNS server
51
+
48
52
  $ rogue_one report 1.1.1.1
49
53
  {
50
54
  "verdict": "benign one",
data/lib/rogue_one/cli.rb CHANGED
@@ -6,6 +6,7 @@ require "json"
6
6
  module RogueOne
7
7
  class CLI < Thor
8
8
  desc "report [DNS_SERVER]", "Show a report of a given DNS server"
9
+ method_option :default_list, type: :string, default: "alexa", desc: "A default list of top 100 domains (Alexa or Fortune)"
9
10
  method_option :custom_list, type: :string, desc: "A path to a custom list of domains"
10
11
  method_option :threshold, type: :numeric, desc: "Threshold value for determining malicious or not"
11
12
  method_option :verbose, type: :boolean
@@ -13,10 +14,11 @@ module RogueOne
13
14
  with_error_handling do
14
15
  Ping.pong? dns_server
15
16
 
17
+ default_list = options["default_list"].downcase
16
18
  custom_list = options["custom_list"]
17
19
  threshold = options["threshold"]
18
20
  verbose = options["verbose"]
19
- detector = Detector.new(target: dns_server, custom_list: custom_list, threshold: threshold, verbose: verbose)
21
+ detector = Detector.new(target: dns_server, default_list: default_list, custom_list: custom_list, threshold: threshold, verbose: verbose)
20
22
  puts JSON.pretty_generate(detector.report)
21
23
  end
22
24
  end
@@ -0,0 +1,101 @@
1
+ ---
2
+ - google.com
3
+ - youtube.com
4
+ - tmall.com
5
+ - baidu.com
6
+ - qq.com
7
+ - sohu.com
8
+ - facebook.com
9
+ - login.tmall.com
10
+ - wikipedia.org
11
+ - taobao.com
12
+ - yahoo.com
13
+ - jd.com
14
+ - 360.cn
15
+ - amazon.com
16
+ - sina.com.cn
17
+ - weibo.com
18
+ - pages.tmall.com
19
+ - reddit.com
20
+ - live.com
21
+ - vk.com
22
+ - okezone.com
23
+ - netflix.com
24
+ - blogspot.com
25
+ - office.com
26
+ - csdn.net
27
+ - alipay.com
28
+ - xinhuanet.com
29
+ - stackoverflow.com
30
+ - yahoo.co.jp
31
+ - instagram.com
32
+ - google.com.hk
33
+ - aliexpress.com
34
+ - microsoft.com
35
+ - babytree.com
36
+ - naver.com
37
+ - twitter.com
38
+ - bing.com
39
+ - livejasmin.com
40
+ - amazon.co.jp
41
+ - tribunnews.com
42
+ - ebay.com
43
+ - salesforce.com
44
+ - twitch.tv
45
+ - google.co.in
46
+ - force.com
47
+ - microsoftonline.com
48
+ - apple.com
49
+ - tianya.cn
50
+ - adobe.com
51
+ - pornhub.com
52
+ - msn.com
53
+ - zhanqi.tv
54
+ - dropbox.com
55
+ - linkedin.com
56
+ - yandex.ru
57
+ - wordpress.com
58
+ - myshopify.com
59
+ - amazon.in
60
+ - mail.ru
61
+ - panda.tv
62
+ - imdb.com
63
+ - caijing.com.cn
64
+ - china.com.cn
65
+ - mama.cn
66
+ - amazonaws.com
67
+ - google.com.br
68
+ - trello.com
69
+ - bongacams.com
70
+ - google.de
71
+ - medium.com
72
+ - google.co.jp
73
+ - soso.com
74
+ - booking.com
75
+ - w3schools.com
76
+ - amazon.co.uk
77
+ - spotify.com
78
+ - amazon.de
79
+ - rednet.cn
80
+ - bbc.com
81
+ - detail.tmall.com
82
+ - xvideos.com
83
+ - espn.com
84
+ - detik.com
85
+ - github.com
86
+ - cnn.com
87
+ - instructure.com
88
+ - ok.ru
89
+ - indeed.com
90
+ - yy.com
91
+ - tumblr.com
92
+ - huanqiu.com
93
+ - stackexchange.com
94
+ - nytimes.com
95
+ - imgur.com
96
+ - soundcloud.com
97
+ - whatsapp.com
98
+ - rakuten.co.jp
99
+ - nih.gov
100
+ - sogou.com
101
+ - google.cn
@@ -0,0 +1,101 @@
1
+ ---
2
+ - walmart.com
3
+ - exxonmobil.com
4
+ - berkshirehathaway.com
5
+ - apple.com
6
+ - unitedhealthgroup.com
7
+ - mckesson.com
8
+ - cvshealth.com
9
+ - amazon.com
10
+ - att.com
11
+ - gm.com
12
+ - ford.com
13
+ - amerisourcebergen.com
14
+ - chevron.com
15
+ - cardinalhealth.com
16
+ - costco.com
17
+ - verizon.com
18
+ - kroger.com
19
+ - ge.com
20
+ - walgreensbootsalliance.com
21
+ - jpmorganchase.com
22
+ - fanniemae.com
23
+ - abc.xyz
24
+ - homedepot.com
25
+ - bankofamerica.com
26
+ - express-scripts.com
27
+ - wellsfargo.com
28
+ - boeing.com
29
+ - phillips66.com
30
+ - antheminc.com
31
+ - microsoft.com
32
+ - valero.com
33
+ - citigroup.com
34
+ - comcastcorporation.com
35
+ - ibm.com
36
+ - delltechnologies.com
37
+ - statefarm.com
38
+ - jnj.com
39
+ - freddiemac.com
40
+ - target.com
41
+ - lowes.com
42
+ - marathonpetroleum.com
43
+ - pg.com
44
+ - metlife.com
45
+ - ups.com
46
+ - pepsico.com
47
+ - intel.com
48
+ - dow-dupont.com
49
+ - adm.com
50
+ - aetna.com
51
+ - fedex.com
52
+ - utc.com
53
+ - prudential.com
54
+ - albertsons.com
55
+ - sysco.com
56
+ - disney.com
57
+ - humana.com
58
+ - pfizer.com
59
+ - hp.com
60
+ - lockheedmartin.com
61
+ - aig.com
62
+ - centene.com
63
+ - cisco.com
64
+ - hcahealthcare.com
65
+ - energytransfer.com
66
+ - caterpillar.com
67
+ - nationwide.com
68
+ - morganstanley.com
69
+ - libertymutual.com
70
+ - newyorklife.com
71
+ - gs.com
72
+ - aa.com
73
+ - bestbuy.com
74
+ - cigna.com
75
+ - charter.com
76
+ - delta.com
77
+ - facebook.com
78
+ - honeywell.com
79
+ - merck.com
80
+ - allstate.com
81
+ - tysonfoods.com
82
+ - united.com
83
+ - oracle.com
84
+ - techdata.com
85
+ - tiaa.org
86
+ - tjx.com
87
+ - americanexpress.com
88
+ - coca-colacompany.com
89
+ - publix.com
90
+ - nike.com
91
+ - andeavor.com
92
+ - wfscorp.com
93
+ - exeloncorp.com
94
+ - massmutual.com
95
+ - riteaid.com
96
+ - conocophillips.com
97
+ - chsinc.com
98
+ - 3m.com
99
+ - timewarner.com
100
+ - generaldynamics.com
101
+ - usaa.com
@@ -6,13 +6,15 @@ require "parallel"
6
6
  module RogueOne
7
7
  class Detector
8
8
  attr_reader :target
9
+ attr_reader :default_list
9
10
  attr_reader :custom_list
10
11
  attr_reader :verbose
11
12
 
12
13
  GOOGLE_PUBLIC_DNS = "8.8.8.8"
13
14
 
14
- def initialize(target:, custom_list: nil, threshold: nil, verbose: false)
15
+ def initialize(target:, default_list: "alexa", custom_list: nil, threshold: nil, verbose: false)
15
16
  @target = target
17
+ @default_list = default_list
16
18
  @custom_list = custom_list
17
19
  @threshold = threshold
18
20
  @verbose = verbose
@@ -98,7 +100,14 @@ module RogueOne
98
100
  end
99
101
 
100
102
  def top_100_domains
101
- read_domains File.expand_path("./data/top_100.yml", __dir__)
103
+ case default_list
104
+ when "alexa"
105
+ read_domains File.expand_path("./data/alexa_100.yml", __dir__)
106
+ when "fortune"
107
+ read_domains File.expand_path("./data/fortune_100.yml", __dir__)
108
+ else
109
+ raise ArgumentError, "A list for #{default_list} is not existing"
110
+ end
102
111
  end
103
112
 
104
113
  def read_domains(path)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RogueOne
4
- VERSION = "0.3.0"
4
+ VERSION = "0.4.0"
5
5
  end
data/rogue_one.gemspec CHANGED
@@ -24,11 +24,11 @@ Gem::Specification.new do |spec|
24
24
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
25
  spec.require_paths = ["lib"]
26
26
 
27
- spec.add_development_dependency "bundler", "~> 2.0"
27
+ spec.add_development_dependency "bundler", "~> 2.1"
28
28
  spec.add_development_dependency "coveralls", "~> 0.8"
29
29
  spec.add_development_dependency "rake", "~> 13.0"
30
30
  spec.add_development_dependency "rspec", "~> 3.9"
31
31
 
32
- spec.add_dependency "parallel", "~> 1.18"
33
- spec.add_dependency "thor", "~> 0.20"
32
+ spec.add_dependency "parallel", "~> 1.19"
33
+ spec.add_dependency "thor", "~> 1.0"
34
34
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rogue_one
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manabu Niseki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-12 00:00:00.000000000 Z
11
+ date: 2019-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
19
+ version: '2.1'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.0'
26
+ version: '2.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: coveralls
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -72,28 +72,28 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '1.18'
75
+ version: '1.19'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '1.18'
82
+ version: '1.19'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: thor
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0.20'
89
+ version: '1.0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0.20'
96
+ version: '1.0'
97
97
  description: A rogue DNS detector
98
98
  email:
99
99
  - manabu.niseki@gmail.com
@@ -115,7 +115,8 @@ files:
115
115
  - images/eyecatch.png
116
116
  - lib/rogue_one.rb
117
117
  - lib/rogue_one/cli.rb
118
- - lib/rogue_one/data/top_100.yml
118
+ - lib/rogue_one/data/alexa_100.yml
119
+ - lib/rogue_one/data/fortune_100.yml
119
120
  - lib/rogue_one/detector.rb
120
121
  - lib/rogue_one/domain_list.rb
121
122
  - lib/rogue_one/ping.rb
@@ -1,101 +0,0 @@
1
- ---
2
- - google.com
3
- - facebook.com
4
- - youtube.com
5
- - yahoo.com
6
- - baidu.com
7
- - wikipedia.org
8
- - qq.com
9
- - taobao.com
10
- - twitter.com
11
- - amazon.com
12
- - linkedin.com
13
- - live.com
14
- - google.co.in
15
- - sina.com.cn
16
- - hao123.com
17
- - blogspot.com
18
- - weibo.com
19
- - tmall.com
20
- - vk.com
21
- - wordpress.com
22
- - yahoo.co.jp
23
- - sohu.com
24
- - yandex.ru
25
- - ebay.com
26
- - google.de
27
- - bing.com
28
- - pinterest.com
29
- - google.co.uk
30
- - 163.com
31
- - 360.cn
32
- - google.fr
33
- - ask.com
34
- - instagram.com
35
- - google.co.jp
36
- - tumblr.com
37
- - msn.com
38
- - google.com.br
39
- - mail.ru
40
- - microsoft.com
41
- - xvideos.com
42
- - paypal.com
43
- - google.ru
44
- - soso.com
45
- - adcash.com
46
- - google.es
47
- - google.it
48
- - imdb.com
49
- - apple.com
50
- - imgur.com
51
- - neobux.com
52
- - craigslist.org
53
- - amazon.co.jp
54
- - t.co
55
- - xhamster.com
56
- - stackoverflow.com
57
- - reddit.com
58
- - google.com.mx
59
- - google.com.hk
60
- - cnn.com
61
- - google.ca
62
- - fc2.com
63
- - go.com
64
- - ifeng.com
65
- - bbc.co.uk
66
- - vube.com
67
- - people.com.cn
68
- - blogger.com
69
- - aliexpress.com
70
- - odnoklassniki.ru
71
- - wordpress.org
72
- - alibaba.com
73
- - gmw.cn
74
- - adobe.com
75
- - huffingtonpost.com
76
- - google.com.tr
77
- - xinhuanet.com
78
- - googleusercontent.com
79
- - youku.com
80
- - godaddy.com
81
- - pornhub.com
82
- - akamaihd.net
83
- - thepiratebay.se
84
- - kickass.to
85
- - google.com.au
86
- - amazon.de
87
- - clkmon.com
88
- - ebay.de
89
- - alipay.com
90
- - google.pl
91
- - espn.go.com
92
- - dailymotion.com
93
- - about.com
94
- - bp.blogspot.com
95
- - blogspot.in
96
- - netflix.com
97
- - vimeo.com
98
- - dailymail.co.uk
99
- - redtube.com
100
- - rakuten.co.jp
101
- - conduit.com