Jump to content

Plaintext executable code

- - - - -

  • Please log in to reply
3 replies to this topic

#1
jakash3

jakash3

    Newbie

  • Members
  • PipPip
  • 21 posts
I’ve managed to make a program in ascii. It’s a com file; using characters between 0×20 and 0x7E this program is made of pure human readable ascii.
This is a hello world program. Save as hello.com
X5))%@IP5YI5Y@5P!%PAP[55!5e 5O!54(P^)7CC)7SZBBXPSRABCABCABCABCABCABCABCABCABCZ[XH+H*hello world!$
Run in cmd for 32 bit Windows, or dosbox.
Disassembly (fasm):
org 100h
use16
pop ax
xor ax,2929h
and ax,4940h       ;AX=0900
push ax
xor ax,4959h
xor ax,4059h       ;AX=0
xor ax,2150h
and ax,4150h       ;AX=150
push ax
pop bx             ;BX=150
xor ax,2135h
xor ax,2065h       ;AX=0
xor ax,214fh
xor ax,2834h       ;AX=097B
push ax
pop si             ;SI=097B
sub [bx],si        ;[150] = int 21
inc bx             ;BX=151
inc bx             ;BX=152
sub [bx],si        ;[152] = int 20
push bx
pop dx             ;DX=152
inc dx             ;DX=153
inc dx             ;DX=154
pop ax             ;AX=0900
push ax
push bx
push dx            ;Save AX,BX, and DX
inc cx             ;The rest are just memory fillers
inc dx
inc bx
inc cx
inc dx
inc bx
inc cx
inc dx
inc bx
inc cx
inc dx
inc bx
inc cx
inc dx
inc bx
inc cx
inc dx
inc bx
inc cx
inc dx
inc bx
inc cx
inc dx
inc bx
inc cx
inc dx
inc bx
pop dx             ;DX=0154
pop bx             ;BX=0150
pop ax             ;AX=0900
db 48h,2bh,48h,2ah ;for int 21 and int 20
db "hello world!$" ;your message goes here

Posted Image
Posted Image

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
Very nice, this reminds me of the EICAR test file of which consists of a string of bytes as well, to replicate a virus signature for your antivirus. Good work.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#3
liamzebedee

liamzebedee

    Programmer

  • Members
  • PipPipPipPip
  • 129 posts
How did you find out how to make this? I have been interested in this topic for a long time.

#4
jakash3

jakash3

    Newbie

  • Members
  • PipPip
  • 21 posts

liamzebedee said:

How did you find out how to make this? I have been interested in this topic for a long time.
Well I just printed all the pinrtable characters to a file and ran it through a disassembler (debug.exe) to see which operations I'm allowed to do.
If do a search on ascii shellcode you can find charts on asm operations and their equivalent ascii opcodes like this one: Ascii shellcode - Security101.
Posted Image
Posted Image




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users