Skip to content

Commit 265567f

Browse files
committed
Land rapid7#7530 Improve atg_client to detect unsupported commands
2 parents 2c39a14 + 5b810fa commit 265567f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

modules/auxiliary/admin/atg/atg_client.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ def initialize
1818
This module acts as a simplistic administrative client for interfacing
1919
with Veeder-Root Automatic Tank Gauges (ATGs) or other devices speaking
2020
the TLS-250 and TLS-350 protocols. This has been tested against
21-
GasPot, a honeypot meant to simulate ATGs; it has not been tested
22-
against anything else, so use at your own risk.
21+
GasPot and Conpot, both honeypots meant to simulate ATGs; it has not
22+
been tested against anything else, so use at your own risk.
2323
},
2424
'Author' =>
2525
[
@@ -31,6 +31,7 @@ def initialize
3131
['URL', 'https://community.rapid7.com/community/infosec/blog/2015/01/22/the-internet-of-gas-station-tank-gauges'],
3232
['URL', 'http://www.trendmicro.com/vinfo/us/security/news/cybercrime-and-digital-threats/the-gaspot-experiment'],
3333
['URL', 'https://github.com/sjhilt/GasPot'],
34+
['URL', 'https://github.com/mushorg/conpot'],
3435
['URL', 'http://www.veeder.com/us/automatic-tank-gauge-atg-consoles'],
3536
['URL', 'http://www.chipkin.com/files/liz/576013-635.pdf'],
3637
['URL', 'http://www.veeder.com/gold/download.cfm?doc_id=6227']
@@ -187,6 +188,8 @@ def setup
187188
def get_response(request)
188189
sock.put(request)
189190
response = sock.get_once(-1, timeout)
191+
response.strip!
192+
response += " (command not understood)" if response == "9999FF1B"
190193
response
191194
end
192195

@@ -245,7 +248,8 @@ def run_host(_host)
245248
end
246249
else
247250
response = get_response("#{action.opts[protocol_opt_name]}\n")
248-
print_good("#{protocol} #{action.opts['Description']}:\n#{response}")
251+
print_good("#{protocol} #{action.opts['Description']}:")
252+
print_line(response)
249253
end
250254
ensure
251255
disconnect

0 commit comments

Comments
 (0)