Intro to MASM

Sometimes a Linux users need to learn how the assembly works on the Windows operating system. Why?

If someone is a Linux user has malware research in the Windows operating system, it can be helpful to see how the malware works on the Windows operating system and most of the malware is not running on the Linux operating system.

So, how to begin? Download the materials beforehand

– WinAsm (Please download in or

First time using MASM, initially a little strange but it is the same with other ASM. Both of them use the same operating system libraries respectively.

Let’s try with a simple hello world program 🙂

; Arch
.model flat,stdcall
option casemap:none

; Library
includelib user32.lib
includelib kernel32.lib

; Data
szCaption db "Hello",0
szMsg db "Hello World!",0

; Var
retvalue dd ?

; Main
	invoke MessageBox,NULL,addr szMsg,addr szCaption,MB_OK
	mov retvalue,eax
	xor eax,eax
	invoke ExitProcess,eax
end start



Somewhat annoying indeed, because oriented GUI and I kinda don’t like the GUI.

That’s it, may be useful.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s