Giter VIP home page Giter VIP logo

assembly_learningrepo's Introduction

Assembly_LearningRepo

FYI: functions in assembly are called "Procedures"

The "mov" instruction is used to move data between registers, and between registers and memory!

The "xchg" instruction lets you exchange the contents of two registers or between register and memory!

The "lea" instruction (load effective address) loads the address of the source into the destination.

The "add" adds some value to another value for instance: mov rax, 0x1 ---> rax 0x3 add rax, 0x2

The "sub" subtracts a value from another value.

The "stc" instrcution stands for set carry flag it is used together with "adc" both add +1 in this example: mov rax, 0x5 --> rax 0x7 stc adc rax, 0x1

The "sbb" instruction will subtract -1 from the carry flag

The "inc" instruction stands for increment and will add +1 to a value

The "dec" instruction stands for decrement and will subtract -1 from a value

The "jb" instruction will jump to a section in the code if something is 1

The "jbe" instruction stands for jump if CF is equal to 1 or ZF is equal to 1

The "jns" instruction stands for jump if SF is equal to 0

Bit-shifting operations:

  • arithmetic shift operation
  • logic operation
  • rotate operation

There are two types of arithmetic shift: shift arithmetic left (SAL) & shift arithmetic right (SAR)

There are two types of logical shift: logical shift left (SHL) & logical shift right (SHR), SHL is excatly like SAL

There are two types of rotate operations, rotate right (ROR) & rotate left (ROL)

Binary Obfuscation

Data can be assembled on the stack and used the same works for code. Example: push ... push ... push ...

To convert ASCII text into hex to use in your code try this command on unix systems $ echo "text blabla" | od -x

Debugging

Using gdb Linux:

$nasm -felf64 hello_world.nasm -o hello.o

$ld hello.o -o hello

$gdb ./hello

assembly_learningrepo's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.