Skip to content

Commit

Permalink
Make the output less verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
wvu committed Apr 9, 2014
1 parent 157fb5a commit 84ce723
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions modules/auxiliary/server/openssl_heartbeat_client_memory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def process_openssl_encrypted_request(c, data)
end

message_code = buff[0,1].to_s.unpack("C").first
print_status("#{@state[c][:name]} Message #{sprintf("type %.2x v%.4x %.2x", message_type, message_version, message_code)}")
vprint_status("#{@state[c][:name]} Message #{sprintf("type %.2x v%.4x %.2x", message_type, message_version, message_code)}")

if message_type == 0x16
print_status("#{@state[c][:name]} Processing Client Finished...")
Expand All @@ -222,12 +222,13 @@ def process_openssl_encrypted_request(c, data)

# Process heartbeat replies
if message_type == 0x18
print_status("#{@state[c][:name]} Encrypted heartbeat received (#{buff.length} bytes) [#{@state[c][:heartbeats].length} total]")
vprint_status("#{@state[c][:name]} Encrypted heartbeat received (#{buff.length} bytes) [#{@state[c][:heartbeats].length} bytes total]")
@state[c][:heartbeats] << buff
end

# Full up on heartbeats, disconnect the client
if @state[c][:heartbeats].length >= heartbeat_limit
print_status("#{@state[c][:name]} Encrypted heartbeats received [#{@state[c][:heartbeats].length} bytes total]")
store_captured_heartbeats(c)
c.close()
end
Expand All @@ -238,7 +239,7 @@ def store_captured_heartbeats(c)
if @state[c][:heartbeats].length > 0
begin
path = store_loot("openssl_memory_dump", "octet/stream", c.peerhost, @state[c][:heartbeats], "openssl_client_memory_dump.bin", "OpenSSL Heartbeat Client Memory Dump")
print_status("#{@state[c][:name]} Heartbeat stored in #{path}")
print_status("#{@state[c][:name]} Heartbeat data stored in #{path}")
rescue ::Interrupt
raise $!
rescue ::Exception
Expand Down

0 comments on commit 84ce723

Please sign in to comment.