ronin-listener 0.1.0.rc1 → 0.1.0
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.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/ChangeLog.md +1 -1
- data/data/completions/ronin-listener +23 -23
- data/gemspec.yml +5 -4
- data/lib/ronin/listener/cli/commands/dns.rb +5 -3
- data/lib/ronin/listener/cli/commands/http.rb +7 -13
- data/lib/ronin/listener/version.rb +1 -1
- metadata +11 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8add48e4efe85621678d887dc4abac281a6b773aed650c968aa012c7dcf482d
|
4
|
+
data.tar.gz: 31b11c3f616ba4c77efc08d7ac5c83bc73a1ec015e7cd824cf48a61f5769ecd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60f82e8b52496b0492547f96f44062e561e12f5b419384426131d8d70389917a87b78cd726b07ab9a55c1291ec2629fd47b02b81a8a1c19fe21d4495281e7666
|
7
|
+
data.tar.gz: a73da44c738b54cd5d000925f1481baf8843c0a37163a21451e3cf1b0f108066ab93402ed7eee3ec56ab5f3d9f7630ab5e2d2f35524238483301743253a3f7e4
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-3.
|
1
|
+
ruby-3.3
|
data/ChangeLog.md
CHANGED
@@ -11,7 +11,7 @@ _ronin-listener_completions_filter() {
|
|
11
11
|
|
12
12
|
if [[ "${cur:0:1}" == "-" ]]; then
|
13
13
|
echo "$words"
|
14
|
-
|
14
|
+
|
15
15
|
else
|
16
16
|
for word in $words; do
|
17
17
|
[[ "${word:0:1}" != "-" ]] && result+=("$word")
|
@@ -29,75 +29,75 @@ _ronin-listener_completions() {
|
|
29
29
|
|
30
30
|
case "$compline" in
|
31
31
|
'new http'*'--vhost')
|
32
|
-
while read -r; do COMPREPLY+=(
|
32
|
+
while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A hostname -- "$cur")
|
33
33
|
;;
|
34
34
|
|
35
35
|
'new http'*'--root')
|
36
|
-
while read -r; do COMPREPLY+=(
|
36
|
+
while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A directory -- "$cur")
|
37
37
|
;;
|
38
38
|
|
39
39
|
'http'*'--output')
|
40
|
-
while read -r; do COMPREPLY+=(
|
40
|
+
while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A file -- "$cur")
|
41
41
|
;;
|
42
42
|
|
43
43
|
'dns'*'--output')
|
44
|
-
while read -r; do COMPREPLY+=(
|
44
|
+
while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A file -- "$cur")
|
45
45
|
;;
|
46
46
|
|
47
47
|
'http'*'--vhost')
|
48
|
-
while read -r; do COMPREPLY+=(
|
48
|
+
while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A hostname -- "$cur")
|
49
49
|
;;
|
50
50
|
|
51
|
-
'http'*'
|
52
|
-
while read -r; do COMPREPLY+=(
|
51
|
+
'new http'*'-R')
|
52
|
+
while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A directory -- "$cur")
|
53
53
|
;;
|
54
54
|
|
55
|
-
'
|
56
|
-
while read -r; do COMPREPLY+=(
|
55
|
+
'http'*'--root')
|
56
|
+
while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A directory -- "$cur")
|
57
57
|
;;
|
58
58
|
|
59
59
|
'completion'*)
|
60
|
-
while read -r; do COMPREPLY+=(
|
60
|
+
while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ronin-listener_completions_filter "--print --install --uninstall")" -- "$cur")
|
61
61
|
;;
|
62
62
|
|
63
63
|
'new http'*)
|
64
|
-
while read -r; do COMPREPLY+=(
|
64
|
+
while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ronin-listener_completions_filter "--host -H --port -p --vhost --root -R")" -- "$cur")
|
65
65
|
;;
|
66
66
|
|
67
67
|
'http'*'-o')
|
68
|
-
while read -r; do COMPREPLY+=(
|
68
|
+
while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A file -- "$cur")
|
69
69
|
;;
|
70
70
|
|
71
71
|
'http'*'-R')
|
72
|
-
while read -r; do COMPREPLY+=(
|
72
|
+
while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A directory -- "$cur")
|
73
73
|
;;
|
74
74
|
|
75
75
|
'new dns'*)
|
76
|
-
while read -r; do COMPREPLY+=(
|
76
|
+
while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ronin-listener_completions_filter "--host -H --port -p --domain -d")" -- "$cur")
|
77
77
|
;;
|
78
78
|
|
79
79
|
'dns'*'-o')
|
80
|
-
while read -r; do COMPREPLY+=(
|
80
|
+
while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -A file -- "$cur")
|
81
81
|
;;
|
82
82
|
|
83
83
|
'http'*)
|
84
|
-
while read -r; do COMPREPLY+=(
|
84
|
+
while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ronin-listener_completions_filter "--output -o --output-format -F --host -H --port -p --vhost --root -R")" -- "$cur")
|
85
85
|
;;
|
86
86
|
|
87
|
-
'
|
88
|
-
while read -r; do COMPREPLY+=(
|
87
|
+
'new'*)
|
88
|
+
while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ronin-listener_completions_filter "help dns http")" -- "$cur")
|
89
89
|
;;
|
90
90
|
|
91
|
-
'
|
92
|
-
while read -r; do COMPREPLY+=(
|
91
|
+
'dns'*)
|
92
|
+
while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ronin-listener_completions_filter "--output -o --output-format -F --host -H --port -p")" -- "$cur")
|
93
93
|
;;
|
94
94
|
|
95
95
|
*)
|
96
|
-
while read -r; do COMPREPLY+=(
|
96
|
+
while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ronin-listener_completions_filter "--version -V help completion dns http new")" -- "$cur")
|
97
97
|
;;
|
98
98
|
|
99
99
|
esac
|
100
100
|
} &&
|
101
|
-
complete -F _ronin-listener_completions ronin-listener
|
101
|
+
complete -F _ronin-listener_completions ronin-listener
|
102
102
|
|
103
103
|
# ex: filetype=sh
|
data/gemspec.yml
CHANGED
@@ -2,7 +2,8 @@ name: ronin-listener
|
|
2
2
|
summary: A Ruby CLI utility for receiving exfiltrated data.
|
3
3
|
description: |
|
4
4
|
ronin-listener is a small CLI utility for receiving exfiltrated data over DNS
|
5
|
-
or HTTP.
|
5
|
+
or HTTP. Supports logging DNS queries and HTTP requests as TXT, CVS, JSON,
|
6
|
+
or NDJSON.
|
6
7
|
|
7
8
|
license: LGPL-3.0
|
8
9
|
authors: Postmodern
|
@@ -31,9 +32,9 @@ required_ruby_version: ">= 3.0.0"
|
|
31
32
|
|
32
33
|
dependencies:
|
33
34
|
# Ronin dependencies:
|
34
|
-
ronin-listener-dns: ~> 0.1
|
35
|
-
ronin-listener-http: ~> 0.1
|
36
|
-
ronin-core: ~> 0.2
|
35
|
+
ronin-listener-dns: ~> 0.1
|
36
|
+
ronin-listener-http: ~> 0.1
|
37
|
+
ronin-core: ~> 0.2
|
37
38
|
|
38
39
|
development_dependencies:
|
39
40
|
bundler: ~> 2.0
|
@@ -108,11 +108,13 @@ module Ronin
|
|
108
108
|
# The `DOMAIN` argument.
|
109
109
|
#
|
110
110
|
def run(domain)
|
111
|
-
output_file = if options[:output]
|
111
|
+
output_file = if options[:output]
|
112
112
|
options[:output_format].open(options[:output])
|
113
113
|
end
|
114
114
|
|
115
|
-
|
115
|
+
log_info "Listening on #{options[:host]}:#{options[:port]} ..."
|
116
|
+
|
117
|
+
Ronin::Listener::DNS.listen(domain,**server_kwargs) do |query|
|
116
118
|
log_info "Received DNS query: #{query.type} #{query.label} from #{query.source}"
|
117
119
|
output_file << query if output_file
|
118
120
|
end
|
@@ -123,7 +125,7 @@ module Ronin
|
|
123
125
|
#
|
124
126
|
# @return [Hash{Symbol => Object}]
|
125
127
|
#
|
126
|
-
def
|
128
|
+
def server_kwargs
|
127
129
|
{
|
128
130
|
host: options[:host],
|
129
131
|
port: options[:port]
|
@@ -116,30 +116,24 @@ module Ronin
|
|
116
116
|
# Runs the `ronin-listener http` command.
|
117
117
|
#
|
118
118
|
def run
|
119
|
-
output_file = if options[:output]
|
119
|
+
output_file = if options[:output]
|
120
120
|
options[:output_format].open(options[:output])
|
121
121
|
end
|
122
122
|
|
123
|
-
|
124
|
-
remote_addr = request.remote_address
|
125
|
-
|
126
|
-
log_info "Received HTTP request from #{remote_addr.ip_address}:#{remote_addr.ip_port} ..."
|
123
|
+
log_info "Listening on #{options[:host]}:#{options[:port]} ..."
|
127
124
|
|
128
|
-
|
129
|
-
|
130
|
-
request.headers.each do |name,value|
|
131
|
-
puts "#{name}: #{value}"
|
132
|
-
end
|
125
|
+
Ronin::Listener::HTTP.listen(**server_kwargs) do |request|
|
126
|
+
log_info "Received HTTP request from #{request.remote_ip}:#{request.remote_port} ..."
|
133
127
|
|
134
|
-
puts
|
135
|
-
puts
|
128
|
+
puts(request)
|
136
129
|
|
137
130
|
output_file << request if output_file
|
138
131
|
end
|
139
132
|
end
|
140
133
|
|
141
134
|
#
|
142
|
-
# Maps options to keyword arguments for
|
135
|
+
# Maps options to keyword arguments for
|
136
|
+
# `Ronin::Listener::HTTP.listen`.
|
143
137
|
#
|
144
138
|
# @return [Hash{Symbol => Object}]
|
145
139
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ronin-listener
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Postmodern
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ronin-listener-dns
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.1
|
19
|
+
version: '0.1'
|
20
20
|
type: :runtime
|
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: 0.1
|
26
|
+
version: '0.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: ronin-listener-http
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.1
|
33
|
+
version: '0.1'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.1
|
40
|
+
version: '0.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: ronin-core
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.2
|
47
|
+
version: '0.2'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.2
|
54
|
+
version: '0.2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -68,7 +68,8 @@ dependencies:
|
|
68
68
|
version: '2.0'
|
69
69
|
description: |
|
70
70
|
ronin-listener is a small CLI utility for receiving exfiltrated data over DNS
|
71
|
-
or HTTP.
|
71
|
+
or HTTP. Supports logging DNS queries and HTTP requests as TXT, CVS, JSON,
|
72
|
+
or NDJSON.
|
72
73
|
email: postmodern.mod3@gmail.com
|
73
74
|
executables:
|
74
75
|
- ronin-listener
|
@@ -146,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
147
|
- !ruby/object:Gem::Version
|
147
148
|
version: '0'
|
148
149
|
requirements: []
|
149
|
-
rubygems_version: 3.
|
150
|
+
rubygems_version: 3.5.11
|
150
151
|
signing_key:
|
151
152
|
specification_version: 4
|
152
153
|
summary: A Ruby CLI utility for receiving exfiltrated data.
|