As a part of the HW, you had to write your approach to overflow a buffer and subvert the program execution. In this context, there are a few terms that we would like to introduce: - Safe Exit: After goes through a subverted execution flow, the attacker usually ensures that the program completes successfully. After all, the attacker does not want the program to seg fault, thereby making the attack detectable. Please ensure that your program exits gracefully (No Seg fault). - Payload: The command line input that you feed in order to overflow the buffer is called the payload. Surely, the payload must overflow a buffer. Apart from this, you can tailor the payload in order to perform specific attacks such as privilege escalation, changing passwords etc. - Experienced attackers typically write python scripts to automatically generate the payloads. They also write a loop that feeds input and executes a program. In this HW, you will overflow the buffer and construct a payload for performing 4 different attacks - ordered according to the level of difficulty. For the first task you will use hw_bufferOverflow and for rest 3 use hw_ret2libc folder. You will have to submit a single tar file which contains the following: - Report highlighting where the buffer overflow is in each case. - Payload for each attack - Python scripts used to generate the payload - Source code - Instructions to execute the attack : README. Payloads -------- [VERY EASY] (4 marks) Craft a payload to print "YOU GOT IT !!" [EASY] (3 marks) Get details about the server. The output of the program should be something like "Linux optiplex 3.13.0-133-generic x86_64" [MEDIUM EASY] (3 marks) Get users that have accounts in the server. Need to open, read, and then print /etc/passwd file. Alternatively, you can use the function getpwuid (https://www.systutorials.com/docs/linux/man/3-getpwnam/) [NOT EASY] (bonus 1 marks). Change a password of some user in the server. You can use putpwent you would need assume that printargv has the setuid bit set.