مطالب پیشنهادی از سراسر وب

آموزش کامل برنامه نویسی Assembly

دسته بندی ها: آموزش اسمبلی (Assembly) ، آموزش های یودمی (Udemy)

زبان Assembly یک زبان برنامه‌نویسی سطح پایین برای رایانه‌ها و دیگر دستگاه‌های برنامه‌پذیر است که با دستورالعمل‌های زبان ماشین کار می کند. هر زبان اسمبلی مختص به یک معماری رایانه خاص است، برخلاف بیشتر زبان‌های برنامه‌نویسی سطح بالا که با معماری‌های مختلف سازگار هستند ولی برای اجرا شدن به مفسر و مترجم نیاز دارند.

این آموزش تصویری برنامه نویسی Assembly را به طور کامل آموزش می دهد. در این دوره با چگونگی اجرای زبان Assembly آشنا شده و همچنین پردازنده های x86 32 بیتی ، معماری پردازنده های x86 ، مفاهیم زبان سطح پایین ارائه می شود.

این دوره آموزشی محصول موسسه Udemy است.

سرفصل های دوره:

  • کار با ابزارهای برنامه
  • کار با ویرایشگر متن
  • کار با سیستم دودویی
  • جمع و تفریق در مبنای 2
  • نحوه تبدیل اعداد بین مبناها
  • کار با داده های مبنای 16
  • کار با اعداد علامت دار
  • کار با پردازنده های x86
  • ساختار عمومی برنامه
  • کار با دستورالعمل INC، DEC و MUL
  • مقدمه ای بر FASM
  • معرفی FASM
  • نصب و راه اندازی fasm
  • مدیریت خطا
  • استفاده از دستور JMP
  • کار با دستورات شرطی
  • کار با دستور cmp
  • کار با جبر بولی
  • کار با دستورالعمل بیتی
  • دستورالعمل های عمومی حافظه
  • نحوه تعریف داده ها
  • کار با رشته ها
  • کار با پیشوندهای REP
  • معرفی زیرروالها
  • کار با پشته
  • راهنمای AMD
  • معرفی WinDbg
  • نصب و راه اندازی WinDbg
  • کار با اپراتور ها
  • و...

عنوان دوره: Udemy Assembly Language Adventures: Complete Course

مدت زمان: 30 ساعت

نویسنده : xor pd

توضیحات:

Learn Assembly Language
The x86 Adventures series teaches you your computer's language - x86 Assembly language, from scratch.
Why learn x86 Assembly Language?
You are the kind of person who really likes to know how things work. In this course you are going to get solid understanding on how computer programs work from the inside.
Become a better programmer - Knowing how things work down there will help you take better decisions, even as a high level programmer. If you were always wondering what is the stack, or what are those pointers everyone talks about, you came to the right place.
Write faster code - When you really want to get the most of your processor, writing in raw Assembly is needed. We are not going to talk about optimizations in this course, however you will get a solid foundations so that you can continue exploring on your own.
You want to become a reverse engineer or a security researcher, read the code of viruses or look for software vulnerabilities. As most of the time the original source code will not be available to you, solid understanding of x86 Assembly Language is mandatory.
The course is made of video lectures. A lecture could be from a presentation, or a real world example, showing me doing stuff at the computer.
Almost every video lecture is accompanied by some kind of exercise (You will be told during the lecture, don't worry :) ) The exercises are open source. They are attached here as a rar file, however you could also get them on github. (See "About this course" video for more information).
It is crucial that you complete the exercises. You will learn a lot from the lectures, but it is pretty much a waste of your time and money if you don't do the exercises. (Or at least verify that you know how to do them, if you are more experienced).
Course tech stack
No prior knowledge is assumed for this course, but I do assume some things regarding your system, so make sure that everything here describes you:
You are using a Windows operation system. (The course videos use Windows 7). It is recommended to use at least Windows XP.
You have an intel x86 processor. (If you don't know what you have then you have x86 processor, trust me).
For the tech savvy, some more details about the tools we are going to use in this course:
Assembly flavour: x86 32 bits protected mode.
Assembler: The Flat Assembler (FASM)
Debugger: WinDbg.
Using Linux? Most of the exercises were ported to linux, however the videos show me using windows 7. Contact me if you are not sure.
What are the requirements?
No prior knowledge is assumed!
What am I going to get from this course?
Over 118 lectures and 29 hours of content!
Learn to code on the x86 Architecture using Assembly Language
Gain solid understanding about low level concepts.
Understand how your computer works
Become a tough person
Section 1: Intro
Lecture 1	
About this course 
Preview
07:31
General information about the course: List of main subjects to be covered during this course, some technical details and some requirements for the course.
Lecture 2	
Tools - File Explorer 
Preview
06:04
Explaining the file explorer - The program we use to view files on our computer. We also discuss Total Commander, which I am going to use during this course.
Lecture 3	
Tools - Hex Editor 
Preview
15:53
Explaining the Hex Editor - A program that allows us to view the internal structures of files inside our computer. Specifically we discuss the HxD Hex Editor.
Lecture 4	
Tools - Text Editor 
Preview
17:38
We discuss Text Editors - programs that are used to view and edit text files inside our computer. We introduce notepad, notepad++, and a bit of vim.
Section 2: The Binary numeric system
Lecture 5	
Addition and Subtraction 
Preview
23:36
We discuss the idea of numeric bases, and specifically we take a look at base 10 and base 2. Finally we have some examples of addition and subtraction in base 2.
Lecture 6	
Base Conversion (Part 1) 
Preview
23:17
We introduce three ways to convert numbers between different numeric representations: Direct evaluation, Finding largest power and Remainder evaluation.
Lecture 7	
Base Conversion (Part 2) 
Preview
12:55
We discuss how to decide which conversion method to use in different cases, and also show a few examples of converting numbers between different bases.
Lecture 8	
Hexadecimal Base 
Preview
22:33
We discuss the Hexadecimal base (Base 16), and show its special relation to base 2.
Lecture 9	
Hexadecimal Base (Bonus) 
Preview
09:06
We answer the question: Why is every hex digit is represented by exactly 4 binary digits?
Lecture 10	
Signed Numbers (Part 1) 
15:17
We discuss the subtraction operation, and also negative numbers, in the base 10 representation. We study how to invoke subtraction using only the addition operation.
Lecture 11	
Signed Numbers (Part 2) 
09:05
We introduce the two's complement representation, which allows us to deal with signed numbers in base 2, just like we did previously in base 10.
Lecture 12	
Signed Numbers (Part 3) 
16:14
We look at examples of signed addition, we deal with some exceptions regarding
the two's complement representation, then we view a graphical representation of
the positive and negative numbers in the two's complement, and finally we
discuss some philosophy of representation.
Section 3: x86 Architecture
Lecture 13	
Basic History 
18:30
Basic history of the x86 architecture: The first processors in the family, the idea of backwards compatibility in the x86 architecture, and the different modes inside the x86 processors.
Lecture 14	
Basic Structure 
20:16
We explain how programs are stored in memory, and how they are executed by the processor. Next we study about the x86 32-bit registers.
Lecture 15	
First Instructions (Part 1) 
13:23
We learn about the general structure of x86 instructions, and we discuss the MOV instruction.
Lecture 16	
First Instructions (Part 2) 
21:51
We introduce the ADD and SUB instructions.
Lecture 17	
Basic Arithmetic (Part 1) 
14:52
We introduce the INC, DEC and MUL instructions.
Lecture 18	
Basic Arithmetic (Part 2) 
Preview
10:38
We introduce the DIV instruction.
Lecture 19	
Basic Arithmetic (Part 3) 
04:36
We show examples for exceptions generated by using the DIV instruction.
Lecture 20	
Basic Arithmetic (Part 4) 
07:46
We look at some examples of using the DIV instruction (With numeric examples). Finally we summarize the Basic Arithmetic series of lessons.
Section 4: Introduction to FASM
Lecture 21	
fasm intro 
11:39
Introducing FASM - The Flat Assembler.
We discuss a few different common assemblers, and finally we describe FASM, and a few different reasons to use FASM. We end with a short description of how to install FASM. We will expand on this in the next lessons.
Lecture 22	
fasm installation 
21:29
Fasm installation. We take a look at Fasm's website, and explain how to download and install Fasm.
Lecture 23	
First Programs - bare 
23:13
We assemble our first program - bare.asm, and view the generated file in a hex editor.
Lecture 24	
First Programs - console (Part 1) 
18:11
We take a look at the program console.asm, which is our first console program. We discuss the source code of console.asm
Lecture 25	
First Programs - console (Part 2) 
21:03
We try to assemble the console.asm program, and we have to fix the INCLUDE environment variable to make that happen. Finally we manage to assemble and run the program. We then analyze the output file with a hex editor.
Lecture 26	
First Programs - first program (Part 1) 
19:45
We introduce first_program.asm. This is our first program that actually has input and output. We take a look at the source code, and compare it to console.asm, the previous program. Later we try to assemble the program. For that task, we have to update the INCLUDE environment variable. Finally we run the program, and analyze the output of the program.
Lecture 27	
First Programs - first program (Part 2) 
07:25
We create our own program, based on first_program.asm. Our program will read two numbers from the user, add those two numbers, and then print the result back to the console.
Lecture 28	
Basic Assembly Errors (Part 1) 
11:31
We introduce different examples of assembly time errors, and how to deal with them.
We begin with the Write Failed Error.
Lecture 29	
Basic Assembly Errors (Part 2) 
15:14
We introduce more examples of assembly time errors and how to deal with them:
File not found error, Undefined Symbol Error, Illegal Instruction Error, Sizes
don't match error, Another Undefined symbol error and finally Invalid Operand
error.
Section 5: Branching
Lecture 30	
Branching Intro (Part 1) 
12:13
We introduce the idea of branching: Having our program run in a nonlinear
fashion. We then discuss the EIP register.
Lecture 31	
Branching Intro (Part 2) 
14:00
We introduce the JMP instruction, we discuss labels, and we view a simple
example of using the JMP instruction.
Lecture 32	
JMP Examples 
13:45
We take a look at two examples using the JMP instruction: An infinite loop, and an example of skipping instructions using the JMP instruction.
Lecture 33	
Flags Register (Part 1) 
12:29
We introduce the Flags register, and discuss the Zero flag.
Lecture 34	
Flags Register (Part 2) 
13:40
We discuss the Sign flag and Carry flag. Then we look at a few examples about the Carry Flag.
Lecture 35	
Flags Register (Part 3) 
14:33
We discuss the Overflow flag and view different examples regarding the Overflow flag.
Lecture 36	
Flags Register (Part 4) 
13:18
We compare the behavior of the Overflow and Carry flags. We also view different
ways of using the Overflow flag and Carry flag for the Signed and Unsigned
numbers.
Lecture 37	
Basic Conditional Branching 
17:48
We describe the idea of conditional branching, and see some examples of using the JZ and JNZ conditional branching instructions. We then briefly mention some other conditional branching instructions.
Lecture 38	
More Conditional Branching (Part 1) 
Preview
22:50
We introduce the CMP instruction, and the idea of comparing numbers. Then we discuss unsigned and signed comparison, and we introduce specialized instructions for unsigned and signed comparisons.
Lecture 39	
More Conditional Branching (Part 2) 
14:31
We describe signed comparison in a more detailed fashion, and add some note about writing readable code with specialized jump instructions.
Lecture 40	
Structured Branching (Part 1) 
17:23
We introduce the idea of Structured Branching and its advantages for writing good code. We then discuss the pattern of conditional execution.
Lecture 41	
Structured Branching (Part 2) 
23:56
We discuss the pattern of loops, and breaking from loops.
Lecture 42	
Structured Branching (Part 3) 
20:08
We introduce some branching rules of thumb. Then we show an example of simplifying a spaghetti code using the idea of Structured Branching.
Section 6: Signed Operations
Lecture 43	
Signed Operations (Part 1) 
14:07
We learn about the NEG instruction, and we discuss the concept of sign
extension. We introduce the instructions MOVZX and MOVSX.
Lecture 44	
Signed Operations (Part 2) 
11:13
We discuss the differences between the MOVZX and MOVSX instructions. Then we
study the instructions CBW, CWDE, CWD, CDQ.
Lecture 45	
Signed Operations (Part 3) 
15:32
We introduce the IMUL and IDIV instructions, the sign aware versions of the MUL and DIV instructions. We explain how they work, and finally show an example of using those instructions.
Section 7: Bitwise Operations
Lecture 46	
Intro to Boolean Algebra (Part 1) 
09:21
We introduce the idea of basic statements, and the basic operators NOT, AND and OR.
Lecture 47	
Intro to Boolean Algebra (Part 2) 
19:54
We discuss the truth tables and Venn diagrams of the basic operators (NOT, AND,
OR). Then we view a few examples involving the basic operators.
Lecture 48	
Intro to Boolean Algebra (Part 3) 
10:55
Basic properties of the NOT, AND and OR operators: Double negation, Commutative laws, Associative laws, Distributive laws. Finally we show an example of using Venn diagram to verify the truthfulness of an equation.

Lecture 49 Intro to Boolean Algebra (Part 4) 21:18 We introduce De Morgan's laws, followed by a few examples of simplifying statements. Then we discuss the XOR operator. Finally further research subjects are mentioned. Lecture 50 Bitwise Instructions (Part 1) 19:58 We introduce the NOT, AND, OR and XOR instructions. Then we discuss Bit Shifting using the SHL and SHR instructions. Lecture 51 Bitwise Instructions (Part 2) 17:01 We discuss arithmetic shifting (Shifting that understands the sign) using the SAL and SAR instructions. Finally we introduce the ROL and ROR instructions, used for bit rotation. Lecture 52 Practical Bit Games 18:24 We study some basic bit manipulation techniques: Extracting one specific bit from a number, Counting the number of 1-s in a binary number, Calculating modulo powers of two using bit operations and finally squeezing a few small numbers into the same container. Section 8: Memory Lecture 53 Memory Intro (Part 1) 14:33 We first discuss the reasons for which we need more data in our programs. Next we describe the basic model of the computer memory, and discuss memory devices which reside outside the processor. Lecture 54 Memory Intro (Part 2) 13:24 We discuss memory abstraction mechanisms supported by the x86 processor. We mention Segmentation and Paging, and show a few illustrations of the Paging mechanism. Lecture 55 Memory Examples - reverse (Part 1) 14:43 We introduce the program reverse.asm, which uses the memory (The RAM) to reverse a list of numbers. We run the program and analyze the source code. Lecture 56 Memory Examples - reverse (Part 2) 12:14 We analyze the internal structure of the output executable file of reverse.asm using a hex editor. Next we continue with reverse_constant.asm, which improves reverse.asm by using a constant. Lecture 57 Memory Examples - get_addr 15:49 We introduce the get_addr.asm program, which demonstrate the meaning of labels, and possible syntax when using labels. Lecture 58 Memory Examples - corrupt 17:00 The program corrupt.asm demonstrates what happens when we try to access memory that we do not own. fix_corrupt.asm demonstrates how to fix corrupt.asm, and finally fix_corrupt_small.asm uses the bss section to get a much more efficient solution. Lecture 59 Data definition 15:36 We discuss different ways of defining data, and inspect the output for each data definition. We learn about bytes, words, dwords, arrays and a bit more complex data definitions. Lecture 60 Data sections 22:43 We introduce the PE sections, and show an example of a program that contains different sections: text, data, bss and idata. Finally we inspect the resulting executable file with a hex editor. Lecture 61 Basic Memory Instructions 26:09 We show how to access memory using assembly instructions. In this lecture we study how to count addresses properly, how to store a dword in memory (Endianity), advanced addressing with the brackets syntax, and some limitations when accessing memory in the x86 architecture. Lecture 62 LEA 19:14 We introduce the LEA instruction. We discuss the syntax of this instruction, and then show a few examples of using the LEA instruction. Lecture 63 Structures (Part 1) 23:36 We explain the need for a way to organize our data, and propose the structure syntax as a solution. We then discuss different ways of defining and declaring structures. Lecture 64 Structures (Part 2) 15:57 We show different examples of using structures, and then we discuss the possibility of nesting structures. Lecture 65 Structures (Part 3) 13:35 We discuss Unions, and we view an example of using unions (Unions IPV4 example). Lecture 66 Memory Ideas (Part 1) 16:17 We take a look at a few examples of memory constructs: Array of structures and Two dimensional table. We put emphasis on the techniques of storing those constructs inside our program's linear memory. Lecture 67 Memory Ideas (Part 2) 09:47 We show an example of storing a multiplication table into a two dimensional array. Then we discuss the possibility of storing higher dimensional arrays inside the program's memory. Lecture 68 Memory Ideas (Part 3) 09:39 We discuss the memory construct of Binary Tree, and show an example of representing a Binary Tree in memory. Lecture 69 Addressing Rules Of Thumb 09:29 We describe a few rules of thumb regarding address arithmetic. Those rules help distinguish between addresses and offsets. Section 9: Strings Lecture 70 ASCII 08:47 We introduce the ASCII standard for encoding text as numbers inside the computer. We also mention the Unicode standard. Lecture 71 Character Map 02:07 We introduce the Character Map windows program, which is a tool for viewing different characters and their corresponding ASCII or Unicode codes. Lecture 72 String Representation Preview 15:55 In this video we explain how to represent text strings inside our own assembly programs. We also introduce two schools of strings: Length prefix and Null terminated strings. Lecture 73 UTF8 Example 07:54 We show an example of using Unicode characters inside a Fasm assembly program. In this example we want to store two Chinese characters in memory. Eventually we assemble the program and view the output file inside a hex editor. Lecture 74 First String Instructions (Part 1) 12:05 We introduce the STOS instruction, and show a simple example of using this instruction. Then we discuss the direction flag and its significance. Lecture 75 First String Instructions (Part 2) 18:16 We introduce the instructions LODS, MOVS, and we show simple usage examples for both of those instructions. Lecture 76 REP Prefixes (Part 1) 21:43 We introduce the REP prefix, and use it together with STOSB to clear an array. Next we introduce the SCAS instruction. Finally we introduce the REPNZ prefix, and use it together with the SCAS instruction to search for the NULL terminator of a string. Lecture 77 REP Prefixes (Part 2) 20:13 We discuss the REPZ and the REPNZ prefixes. Then we introduce the CMPS instruction, and show an example of using CMPS with the REPZ prefix to check the equality of two memory buffers. Section 10: Subroutines and The Stack Lecture 78 Subroutines Intro 21:15 Subroutines are independent pieces of code. We explain the need for subroutines, and next we try to create our own subroutines using a simple JMP instruction. This first attempt is not so successful, but it prepares us for a more advanced idea of implementing subroutines, which we are going to see in the next lessons. Lecture 79 The Stack 20:27 We study the Stack data structure. Then we study the x86 stack implementation and instructions (PUSH and POP). Eventually we see some simple examples of using the stack. Lecture 80 Call and Ret (Part 1) 10:01 We show an example of using the CALL and RET instruction to implement a subroutine. Then we study CALL and RET in detail. Lecture 81 Call and Ret (Part 2) 17:05 We see a few examples of using the CALL and RET instructions. Then we explain the Stack's meaning with respect to function calls. Lecture 82 Calling Conventions (Part 1) 13:29 We explore different methods of communicating with subroutines: Registers, Global data and the Stack. Lecture 83 Calling Conventions (Part 2) 12:34 We discuss the idea of calling conventions. Then we introduce the CDECL and STDCALL calling conventions, and compare them. Lecture 84 Local State (Part 1) 19:38 We introduce the EBP register, and we explain how to use it to hold the stack frame in our functions. Next we discuss local variables, and how to use the stack to store local variables for the current function. Lecture 85 Local State (Part 2) 18:00 We introduce the idea of The Call Stack, and next we study the ENTER and LEAVE instructions, which are shortcuts for creating and destroying a function's stack frame. Section 11: Manuals Lecture 86 Downloading the manuals 10:04 We show how to obtain the Intel and AMD instruction set manuals. Lecture 87 Intel Manual (Part 1) 10:07 We take a look at Intel's Instruction Set manual, and explain how to use it. Lecture 88 Intel Manual (Part 2) 14:07 We learn how to read information about specific instructions inside the Intel's Instruction set manual. Specifically we study the ADD instruction, and the ADC instruction. Lecture 89 AMD Manual 10:46 We take a look at the AMD Instruction Set manuals, and learn how to use them. We then take a look at the ADD instruction as described inside the AMD Instruction Set manual. Lecture 90 Last Comments 02:17 Some comments regarding the differences of Intel and AMD's manuals. Also some comments about the importance of being able to read the manuals, and about the importance of actually checking the manuals from time to time. Section 12: Debugging Lecture 91 First Example 19:46 We show a simple example of debugging an assembly program. We use WinDbg to debug the program mem_count.asm. We see very briefly how to use breakpoints, single step through the code and read the program's memory. All of those steps are going to be explained in detail in the next lessons. This is just a demonstration of what is possible using a debugger. Lecture 92 Debugger Intro 23:07 We explain generally what is a debugger. In this lesson we answer the questions: What is a debugger? Why use a debugger? We also describe a few mechanisms used by modern debuggers. Lecture 93 WinDbg Intro 04:24 We introduce the WinDbg debugger. We discuss briefly the features of the WinDbg debugger, explain the interface of the debugger, and mention the existence of WinDbg's help menu. Lecture 94 WinDbg Installation 06:35 In this lesson we download and install WinDbg. This is done by installing the Windows 8.1 SDK package, choosing only the Debugging Tools. Lecture 95 Examples - Basic Control 19:55 We demonstrate basic control with WinDbg: Loading executable files, Using the disassembly window, restarting a program, attaching to a program, Using the g command, Single Stepping, Using the bp $exentry command. Lecture 96 Examples - State - Basics (Part 1) 10:32 We view the increaser.asm program, and inspect its source code. We open this program with WinDbg, and demonstrate basic commands to handle the state of the target program while it is paused. We begin with the r command, used to inspect or change the contents of the registers. Lecture 97 Examples - State - Basics (Part 2) 14:51 We show more commands to handle the state of the target program while it is paused. We introduce the db,dw,dd commands for reading the program's data. We also introduce the memory window, and the lm command to show the program's memory map. Next we discuss the u command which unassembles data from the program's memory. Lecture 98 Examples - State - Basics (Part 3) 18:48 We demonstrate how to change the value of a register using the r command, and how to write a few instructions to memory using the a (Assemble) command. We introduce the eb,ew,ed commands that allow modifying the program's memory. Lecture 99 Examples - State - Question Mark 08:30 We introduce the Evaluate Expression command, also known as the Question Mark command ("?"). We show a few examples of using this command to evaluate a few simple expressions, and then we continue to a few more complicated expressions. We also mention the poi operator, to reference memory with the Question Mark command. Lecture 100 Examples - State - Searching Preview 08:11 We introduce the s command, used to search data inside the program's memory. We use this command as an alternative way to find the entry point of our program. Instructor Biography xor pd , Low level technology training xorpd is a technology training company, specializing in the low level aspects of technology. It is the destination for anyone that wants to really understand how things work, from the inside.

حجم فایل: 4GB

آیا این نوشته را دوست داشتید؟
Udemy Assembly Language Adventures Complete Course

پیشنهاد آموزش مرتبط در فرادرس


مهدی 6 ماه قبل

دم همتون گرم.

مرصاد 4 سال و 9 ماه قبل

مرسی خیلی گلید به مولا

Arsham 5 سال و 9 ماه قبل

آقا احسان دمت گرم
خیلی ممنون بابت گذاشتن این آموزش

محمد علی 5 سال و 9 ماه قبل

اقای مدیر دستت درد نکنه گذاشتم رو دانلود
خیلی با معرفتی واقعا زحمت کشید ید:-)