Answer the following questions which are based on the lecture material for this week.
Using the distinction we made between viruses and worms in lecture, classify the following:
a screensaver program that automatically emails itself to everyone in the contact list of whoever runs it
a Microsoft Word file containing macros (scripting supported by Microsoft Word) that modifies other Microsoft Word files to contain the same macros
a program distributed with the installer for a free game that injects ads in webpages
a program that, when run by a user on a corporate network, installs a copy of itself to every machine that user can remote desktop into and which injects ads in webpages
a program that is installed by visiting a malicious webpage that exploits a bug in some webbrowsers that records the keystrokes of the current user
Consider the following x86-64 assembly snippet in AT&T syntax:
movq $0x400000, %rax
movq $0x480, %rbx
movq $0x100, %rcx
movb (%rax, %rbx), %cl
addq $1, %rcx
or the same snippet rewritten in Intel syntax:
mov rax,0x400000
mov rbx,0x480
mov rcx,0x100
mov cl,BYTE PTR [rax+rbx*1]
add rcx,0x1
After this runs the value of %rcx
will be equal to _______?
The following questions are about how the Linux x86-64 calling convention would apply to
the function foo
in
struct pair {
int a;
int b;
};
void foo(struct pair w, int x, int y, double z);
To help answer these questions, some possible strategies include:
gcc -S -Os
(on a Linux x86-64 system) will produce a reasonably readable assembly file;The argument w
will be passed:
The argument x
will be passed:
The argument z
will be passed: