GNU nano 4.9.3 hellorelati global _start section .text inc extit.nasm inc2.0 _start: inc nasm inc.o jmp code hello_world: db 'Hello world',0xa incr int code: intine intinel mov al,1 xor rdi,rdi add rdi,1 lea rsi, [rel hello_world] xor rdx,rdx add rdx, 12 syscall fib.c intinel.c intine2.c inline2stack.c fib.o intines intine3.c intine bin Flag flags.nasm flags.o FLjmp intine.c Intinemov xor rax,rax add rax, 60 xor rdi,rdi syscall intinemov.c intinersp.c instack Jse nasm to generate the object file hello.e Jse the debugger to find the relative address that contains the string hello wordd. Jse obidump -d hello.o to display the opcode

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
1. Create the following hellorelative.nasm code
GNU nano 4.9.3
hellorelative.nasm
global _start
exit.nasm
in
inc
Loop
Lop
ex.o
section .text
extit.nasm
inc2.0
14
|_start:
inc.nasm
inc.o
Make
jmp code
hello_world: db 'Hello world',0xa
incr
max2
int
mes
code:
intine
mesg
asm
intinel
mess
mov al,1
xor rdi,rdi
add rdi,1
lea rsi, [rel hello_world]
xor rdx,rdx
add rdx, 12
syscall
fib.c
inlinel.c
mess
fib.o
inline2.c
min
inline2stack.c
min.
intines
ms
inline3.c
mse
intine.bin
flag
flags.nasm
flags.o
Fljmp
fljmp.o
inline.c
12
intinemov
name
xor rax,rax
add rax, 60
xor rdi,rdi
syscall
inlinemov.c
name
inlinersp.c
stack
name
name
2. Use nasm to generate the object file hello.o
3. Use the debugger to find the relative address that contains the string hello world.
4. Use obidump -d helloo to display the opcode
5. Use the following regular expressions to extract the opcode (shellcode) from obidump as
follows:
Obidump -D -M intel hello o l grep '[0-9a-fl:' | cut -c7-26 | paste -d
-s
| tr -s
'I sed 's/ Ax/g' | sed 's/llxS// | sed s'/55/lx55/ > shellcode
6. Attach the opcode and the extracted opcode(shellcode)
Transcribed Image Text:1. Create the following hellorelative.nasm code GNU nano 4.9.3 hellorelative.nasm global _start exit.nasm in inc Loop Lop ex.o section .text extit.nasm inc2.0 14 |_start: inc.nasm inc.o Make jmp code hello_world: db 'Hello world',0xa incr max2 int mes code: intine mesg asm intinel mess mov al,1 xor rdi,rdi add rdi,1 lea rsi, [rel hello_world] xor rdx,rdx add rdx, 12 syscall fib.c inlinel.c mess fib.o inline2.c min inline2stack.c min. intines ms inline3.c mse intine.bin flag flags.nasm flags.o Fljmp fljmp.o inline.c 12 intinemov name xor rax,rax add rax, 60 xor rdi,rdi syscall inlinemov.c name inlinersp.c stack name name 2. Use nasm to generate the object file hello.o 3. Use the debugger to find the relative address that contains the string hello world. 4. Use obidump -d helloo to display the opcode 5. Use the following regular expressions to extract the opcode (shellcode) from obidump as follows: Obidump -D -M intel hello o l grep '[0-9a-fl:' | cut -c7-26 | paste -d -s | tr -s 'I sed 's/ Ax/g' | sed 's/llxS// | sed s'/55/lx55/ > shellcode 6. Attach the opcode and the extracted opcode(shellcode)
Expert Solution
steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Knowledge Booster
Concept of Threads
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education