Capture: HTTP JavaScript Keylogger - Metasploit
This page contains detailed information about how to use the auxiliary/server/capture/http_javascript_keylogger metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: Capture: HTTP JavaScript Keylogger
Module: auxiliary/server/capture/http_javascript_keylogger
Source code: modules/auxiliary/server/capture/http_javascript_keylogger.rb
Disclosure date: -
Last modification time: 2018-04-20 16:34:51 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): -
List of CVEs: -
This modules runs a web server that demonstrates keystroke logging through JavaScript. The DEMO option can be set to enable a page that demonstrates this technique. Future improvements will allow for a configurable template to be used with this module. To use this module with an existing web page, simply add a script source tag pointing to the URL of this service ending in the .js extension. For example, if URIPATH is set to "test", the following URL will load this script into the calling site: http://server:port/test/anything.js
Module Ranking and Traits
Module Ranking:
- normal: The exploit is otherwise reliable, but depends on a specific version and can't (or doesn't) reliably autodetect. More information about ranking can be found here.
Basic Usage
msf > use auxiliary/server/capture/http_javascript_keylogger
msf auxiliary(http_javascript_keylogger) > exploit
Go back to menu.
Msfconsole Usage
Here is how the server/capture/http_javascript_keylogger auxiliary module looks in the msfconsole:
msf6 > use auxiliary/server/capture/http_javascript_keylogger
msf6 auxiliary(server/capture/http_javascript_keylogger) > show info
Name: Capture: HTTP JavaScript Keylogger
Module: auxiliary/server/capture/http_javascript_keylogger
License: Metasploit Framework License (BSD)
Rank: Normal
Provided by:
Marcus J. Carey <[email protected]>
hdm <[email protected]>
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
DEMO false yes Creates HTML for demo purposes
SRVHOST 0.0.0.0 yes The local host or network interface to listen on. This must be an address on the local machine or 0.0.0.0 to listen on all addresses.
SRVPORT 8080 yes The local port to listen on.
SSL false no Negotiate SSL for incoming connections
SSLCert no Path to a custom SSL certificate (default is randomly generated)
URIPATH no The URI to use for this exploit (default is random)
Description:
This modules runs a web server that demonstrates keystroke logging
through JavaScript. The DEMO option can be set to enable a page that
demonstrates this technique. Future improvements will allow for a
configurable template to be used with this module. To use this
module with an existing web page, simply add a script source tag
pointing to the URL of this service ending in the .js extension. For
example, if URIPATH is set to "test", the following URL will load
this script into the calling site:
http://server:port/test/anything.js
Module Options
This is a complete list of options available in the server/capture/http_javascript_keylogger auxiliary module:
msf6 auxiliary(server/capture/http_javascript_keylogger) > show options
Module options (auxiliary/server/capture/http_javascript_keylogger):
Name Current Setting Required Description
---- --------------- -------- -----------
DEMO false yes Creates HTML for demo purposes
SRVHOST 0.0.0.0 yes The local host or network interface to listen on. This must be an address on the local machine or 0.0.0.0 to listen on all addresses.
SRVPORT 8080 yes The local port to listen on.
SSL false no Negotiate SSL for incoming connections
SSLCert no Path to a custom SSL certificate (default is randomly generated)
URIPATH no The URI to use for this exploit (default is random)
Advanced Options
Here is a complete list of advanced options supported by the server/capture/http_javascript_keylogger auxiliary module:
msf6 auxiliary(server/capture/http_javascript_keylogger) > show advanced
Module advanced options (auxiliary/server/capture/http_javascript_keylogger):
Name Current Setting Required Description
---- --------------- -------- -----------
ListenerComm no The specific communication channel to use for this service
SSLCipher no String for SSL cipher spec - "DHE-RSA-AES256-SHA" or "ADH"
SSLCompression false no Enable SSL/TLS-level compression
SendRobots false no Return a robots.txt file if asked for one
URIHOST no Host to use in URI (useful for tunnels)
URIPORT no Port to use in URI (useful for tunnels)
VERBOSE false no Enable detailed status messages
WORKSPACE no Specify the workspace for this module
Auxiliary Actions
This is a list of all auxiliary actions that the server/capture/http_javascript_keylogger module can do:
msf6 auxiliary(server/capture/http_javascript_keylogger) > show actions
Auxiliary actions:
Name Description
---- -----------
Evasion Options
Here is the full list of possible evasion options supported by the server/capture/http_javascript_keylogger auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(server/capture/http_javascript_keylogger) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
HTML::base64 none no Enable HTML obfuscation via an embeded base64 html object (IE not supported) (Accepted: none, plain, single_pad, double_pad, random_space_injection)
HTML::javascript::escape 0 no Enable HTML obfuscation via HTML escaping (number of iterations)
HTML::unicode none no Enable HTTP obfuscation via unicode (Accepted: none, utf-16le, utf-16be, utf-16be-marker, utf-32le, utf-32be)
HTTP::chunked false no Enable chunking of HTTP responses via "Transfer-Encoding: chunked"
HTTP::compression none no Enable compression of HTTP responses via content encoding (Accepted: none, gzip, deflate)
HTTP::header_folding false no Enable folding of HTTP headers
HTTP::junk_headers false no Enable insertion of random junk HTTP headers
HTTP::no_cache false no Disallow the browser to cache HTTP content
HTTP::server_name Apache yes Configures the Server header of all outgoing replies
TCP::max_send_size 0 no Maximum tcp segment size. (0 = disable)
TCP::send_delay 0 no Delays inserted before every send. (0 = disable)
Go back to menu.
Related Pull Requests
- #9897 Merged Pull Request: Fix #8404 ListenerComm Support For Exploit::Remote::TcpServer
- #8716 Merged Pull Request: Print_Status -> Print_Good (And OCD bits 'n bobs)
- #8338 Merged Pull Request: Fix msf/core and self.class msftidy warnings
- #6655 Merged Pull Request: use MetasploitModule as a class name
- #6648 Merged Pull Request: Change metasploit class names
- #5059 Merged Pull Request: Yard doc corrections
- #2525 Merged Pull Request: Change module boilerplate
- #925 Merged Pull Request: msftidy corrections
- #674 Merged Pull Request: Comply with msftidy
- #452 Merged Pull Request: Whitespace cleanup
Go back to menu.
See Also
Check also the following modules related to this module:
- auxiliary/server/capture/http_basic
- auxiliary/server/capture/http_ntlm
- auxiliary/server/http_ntlmrelay
- auxiliary/server/capture/drda
- auxiliary/server/capture/ftp
- auxiliary/server/capture/http
- auxiliary/server/capture/imap
- auxiliary/server/capture/mssql
- auxiliary/server/capture/mysql
- auxiliary/server/capture/pop3
- auxiliary/server/capture/postgresql
- auxiliary/server/capture/printjob_capture
- auxiliary/server/capture/sip
- auxiliary/server/capture/smb
- auxiliary/server/capture/smtp
- auxiliary/server/capture/telnet
- auxiliary/server/capture/vnc
- auxiliary/dos/windows/http/http_sys_accept_encoding_dos_cve_2021_31166
- auxiliary/fuzzers/http/http_form_field
- auxiliary/fuzzers/http/http_get_uri_long
- auxiliary/fuzzers/http/http_get_uri_strings
- auxiliary/gather/http_pdf_authors
- auxiliary/scanner/http/http_header
- auxiliary/scanner/http/http_hsts
- auxiliary/scanner/http/http_login
- auxiliary/scanner/http/http_put
- auxiliary/scanner/http/http_sickrage_password_leak
- auxiliary/scanner/http/http_traversal
- auxiliary/scanner/http/http_version
- post/windows/capture/lockout_keylogger
- post/android/capture/screen
- post/osx/capture/keylog_recorder
- post/osx/capture/screen
- post/windows/capture/keylog_recorder
- exploit/android/browser/webview_addjavascriptinterface
Authors
- Marcus J. Carey <mjc[at]threatagent.com>
- hdm
Version
This page has been produced using Metasploit Framework version 6.1.36-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.