Author Topic: Optimizing NASM Assembler codes in Windows x86  (Read 2066 times)

Offline SHITTY23

  • New Member
  • Posts: 1
Optimizing NASM Assembler codes in Windows x86
« on: September 04, 2022, 09:21:34 PM »
I am a novice in assembler programing, I will will appreciate if someone could review these NASM assembler code for me. Is about encoder decoder.
The encoder performs the following:
  • pads the shellcode with NOP opcodes so it is 4 bytes aligned
  • a random byte is generated for each 4 bytes of the shellcode
  • the 4 bytes are put in the reverse order and XORed with the XOR byte
  • process is repeated until the 0x9090aaaa marker is reached

For those good at NASM assembler for Microsoft Windows, please could you optimize this code? the Code is working but takes lot of time. The shellcode is a windows/meterpreter/reverse_tcp   x86 from msfvenom.

Code: [Select]
global main

; gone
; Frank

« Last Edit: September 05, 2022, 03:02:45 PM by Frank Kotler »

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Optimizing NASM Assembler codes in Windows x86
« Reply #1 on: September 05, 2022, 10:11:37 AM »
Shellcode has rather a bad reputation. Why are you using it?

Best,
Frank


Offline fredericopissarra

  • Full Member
  • **
  • Posts: 368
  • Country: br
Re: Optimizing NASM Assembler codes in Windows x86
« Reply #2 on: September 05, 2022, 01:02:42 PM »
Very funny how you tried to inffect somebody computers with Trojan:Script/Wacatac.Html...

To the moderator I recommend deleting this and ban the user.

PS: Decode (do not run!) the byte stream and let the antivirus do its trick...
« Last Edit: September 05, 2022, 01:06:55 PM by fredericopissarra »

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Optimizing NASM Assembler codes in Windows x86
« Reply #3 on: September 05, 2022, 02:18:58 PM »
Thank you, Fred!

I hadn't decoded decoded his shellcode, but would have before I ran it.
He's gone in just a second.

Best,
Frank


Offline tysonprogrammer

  • Jr. Member
  • *
  • Posts: 22
  • Country: us
  • C# application developer attempting assembly.
Re: Optimizing NASM Assembler codes in Windows x86
« Reply #4 on: September 06, 2022, 09:56:50 PM »
I chuckled at the username and it was a bit suspicious because of it :)

Offline Elawig57

  • Jr. Member
  • *
  • Posts: 5
Re: Optimizing NASM Assembler codes in Windows x86
« Reply #5 on: January 24, 2023, 06:06:43 AM »
Hello,
It looks like the code you've provided

Redacted by moderator!
« Last Edit: January 25, 2023, 04:06:23 AM by Frank Kotler »

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Optimizing NASM Assembler codes in Windows x86
« Reply #6 on: January 24, 2023, 09:17:03 AM »
The person with the questionable name has been banned from the forum.

If you do not want to join him, do not discus malware here!

Seriously,
Frank