EG Information

Main Index
EG Manual
Disclaimer
Legal Information
Hall of Fame
Hall of Shame
Member Rankings
Members List
Meet the Staff

Training Missions

Read Me First New
Basic Skills
Realistic Scenarios
Cryptography
Software Cracking
Linux ELF Binary Cracking
Logical Thinking
Programming
Patching
Steganography
Deface This Wall
/dev/null
/dev/urandom

Knowledge Bank

Discussion Forums
Enigma Chat New
RSS Feeds RSS
Articles / Tutorials
Videos
Online EG MP3 Player Radio
Enigma Zine
Downloads
Tools New

Code Resources

Submit Code
Ajax
ASM
Bash
C
CPP
Csharp
Delphi
Haskell
Java
Javascript
Jython
Lisp
mIRC
MySQL
Perl
PHP
Python
QBASIC
VisualBasic

Hakipedia: An open collaborative for all your information security needs.

The Urinal

Click Here To Vote For EG!

Has Enigma Group Helped You? Then Help Us By Advertising For Us. Place One Of The Following Images On Your Site.

enigma group

enigma group

enigma group

enigma group

Enigma Group's Code Bank


Simple Loop

By: haykuro  -  Date Submitted: 2008-10-05 15:05:51

  1. include 'fasmincludewin32ax.inc' ; include our required librarys and stuff (for Sleep and ShellExecute)
  2.  
  3. .data ; the data section stores data. this is where you define variables and ect.
  4. magicsite db "http://www.google.com/search?q=HACKED",0 ; define variable magicsite and set its value in memory to "http://www......"
  5. action db "open",0 ; define our action for ShellExecute under variable "action" with value "open"
  6.  
  7. .code ; this section tells the compiler where our actual CODE starts.
  8. start: ; doesnt have to be start, can be anything you like, i just use start or "main" for organizational purposes.
  9. @loopme: ; the @ isn't required. it can also be defined as "loopme:" the act of having the colon (":") defines it as a location.
  10. invoke Sleep, 9000 ; invoke is the equivalent to a call in any other language. this allows for a proper stack.
  11. ; the reverse stack for sleep would be something similar to:
  12. ; mov eax, 9000 // place value 9000 into EAX
  13. ; push eax // push EAX (9000) into stack
  14. ; call Sleep // call Sleep
  15. invoke ShellExecute, NULL, action, magicsite, NULL, NULL, SW_SHOWNORMAL ; Call ShellExecute.
  16. jmp @loopme ; Jump back to the location @loopme
  17. @exit: ; Even though we will never reach here, just in case we want to handle it though. ;)
  18. invoke ExitProcess, 0 ; ExitProcess with return code 0 (proper exit)
  19. .end start ; required to close and tell the assembler we're done.
Return to asm category list

Who's Online

486 Guests, 100 Users
Nicid1, ckryptix, TheRetech, Diznablo, Ios, viper0i0, rabbidmind, Nasrudin, CollapsingWalls, mehtaparag, bitstrike, jnony, C, Nusquam-Redono-Sapientia, bazcrown, saifulfaizan, The End, Ultraminor, psychomarine, st3alth, themastersinner, pgmrlink, login, lionaneesh, ishkur88, mahraja, Mac, chekifr, gandalf88, Vap0r, t0ast, tantrum6226, BnE, Distorted, Psiber_Syn, Ausome1, invas10n, oldgoat, freedaysbecumei, BinaryShinigami, Rex_Mundi, Red_beard, Strobeflux, s0m3nak3dguy, Descent, teehee, machupicchu, Genetix, Anandarl, NotMyOwn, thegamerdude, Godzila, popo12341234, RedEvolution, velocity_b, myne17, teto111, aVoid, Central-Gsm, 1101, JackalReborn, InjectioN, h4lted, c0re, DisPater, markt4death, splatta, Jackowacko, saint556, Pyron2312, Azerion, howsens, white.hat.gone.bad, vazzilly, pwunkz, Inverted, QuarterCask, Infernoe11, deskata, cr4ck3rj4ck, Blizer, jasonmax, j0sh, gwenwavor, N4g4c3N, spizeyboy, Network X, Uino59, Jae Cee, ianFDK, saykov, medhaavee, zofy, demonkiller410, Stumble, SaMTHG, kishore, Raze, helasraizam, Venom1019