robiłem to na podstawie:
https://www.youtube.com/watch?v=VroEiMOJPm8&index=6&list=PLhixgUqwRTjxglIswKp9mpkfPNfHkzyeN
program to ten środkowy na stronie:
https://github.com/LiveOverflow/liveoverflow_youtube/tree/master/0x05_simple_crackme_intro_assembler
wersja ubuntu to: 18.04.1
ale na 12 działo się to samo
(i jest mała szansa że podałem złą wersję ale na pewno będzie to albo 12 albo 18 coś)
terminal:
altr@altr-virtual-machine:~$ cd Downloads
altr@altr-virtual-machine:~/Downloads$ gdb license_1
GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from license_1...(no debugging symbols found)...done.
(gdb) set disassembly-flavor intel
(gdb) disassemble main
Dump of assembler code for function main:
0x00000000004005bd <+0>: push rbp
0x00000000004005be <+1>: mov rbp,rsp
0x00000000004005c1 <+4>: sub rsp,0x10
0x00000000004005c5 <+8>: mov DWORD PTR [rbp-0x4],edi
0x00000000004005c8 <+11>: mov QWORD PTR [rbp-0x10],rsi
0x00000000004005cc <+15>: cmp DWORD PTR [rbp-0x4],0x2
0x00000000004005d0 <+19>: jne 0x400623 <main+102>
0x00000000004005d2 <+21>: mov rax,QWORD PTR [rbp-0x10]
0x00000000004005d6 <+25>: add rax,0x8
0x00000000004005da <+29>: mov rax,QWORD PTR [rax]
0x00000000004005dd <+32>: mov rsi,rax
0x00000000004005e0 <+35>: mov edi,0x4006c4
0x00000000004005e5 <+40>: mov eax,0x0
0x00000000004005ea <+45>: call 0x400490 <printf@plt>
0x00000000004005ef <+50>: mov rax,QWORD PTR [rbp-0x10]
0x00000000004005f3 <+54>: add rax,0x8
0x00000000004005f7 <+58>: mov rax,QWORD PTR [rax]
0x00000000004005fa <+61>: mov esi,0x4006da
0x00000000004005ff <+66>: mov rdi,rax
0x0000000000400602 <+69>: call 0x4004b0 <strcmp@plt>
0x0000000000400607 <+74>: test eax,eax
0x0000000000400609 <+76>: jne 0x400617 <main+90>
---Type <return> to continue, or q <return> to quit---
0x000000000040060b <+78>: mov edi,0x4006ea
0x0000000000400610 <+83>: call 0x400480 <puts@plt>
0x0000000000400615 <+88>: jmp 0x40062d <main+112>
0x0000000000400617 <+90>: mov edi,0x4006fa
0x000000000040061c <+95>: call 0x400480 <puts@plt>
0x0000000000400621 <+100>: jmp 0x40062d <main+112>
0x0000000000400623 <+102>: mov edi,0x400701
0x0000000000400628 <+107>: call 0x400480 <puts@plt>
0x000000000040062d <+112>: mov eax,0x0
0x0000000000400632 <+117>: leave
0x0000000000400633 <+118>: ret
End of assembler dump.
(gdb) break *main
Breakpoint 1 at 0x4005bd
(gdb) run
Starting program: /home/altr/Downloads/license_1
/bin/bash: /home/altr/Downloads/license_1: Permission denied
/bin/bash: line 0: exec: /home/altr/Downloads/license_1: cannot execute: Permission denied
During startup program exited with code 126.