Seed Lab
Seed Lab
Seed Lab
g
To be sure, we will login from Boby's account. Then go to Samy's profile.
3.2 Task 1: Posting a Malicious Message to Display an Alert Window
If you want to run a long JavaScript, but you are limited by the number of characters
you can type in the form, you can store the JavaScript program in a standalone file, save
it with the .js extension, and then refer to it using the src attribute in the <script> tag. See
the following example:
1- From Samy's profile, we write the following code:
<script type="text/javascript"
src="http://www.xsslabelgg.com/myscripts.js">
</script>
In the previous step, we embed the above JavaScript code in your profile
Note : XSS External File used when the code is too long.
3.3 Task 2: Posting a Malicious Message to Display Cookies.
Type the following code (<script>alert(document.cookie);</script>)
The result that appears in the alert is the cookies which is contains the information
of communication between the user and the site.
3.4 Task 3: Stealing Cookies from the Victim’s Machine
We do this step by sending the cookies to the hacker by typing the IP of the hacker
and the transmission is done via port 5555 using the TCP protocol.
Note: If the cookies are sent to the hacker, it will not appear. To read the cookie,
we used a common program by attackers is net cat it becomes a TCP server that listens
for a connection on the specified port.
The result
3.5 Task 4: Becoming the Victim’s Friend
We need to write a malicious JavaScript program that forges HTTP requests directly
from the victim’s browser, without the intervention of the attacker. To modify the profile,
we should first find out how a legitimate user edits or modifies his/her profile in Elgg.
More specifically, we need to figure out how the HTTP POST request is constructed to
modify a user’s profile.
1- Login Boby's account and go to the members.
2- Open HTTP Header live.
3- Add Samy as friend
4- Show Smay number in Url
Question 2: If the Elgg application only provide the Editor mode for
the "About Me" field, i.e., you cannot switch to the Text mode, can
you still launch a successful attack?
No, if the Elgg application only provided the Editor mode for the “About me” field,
the attack would not be successful. This is because the Editor mode adds extra HTML
and changes some of the symbols, such as ‘<’ to ‘>’.
3.6 Task 5: Modifying the Victim’s Profile
1- After modifying the code, we enter into Sami's profile
Note: Bobby's profile has been modified and Sami has been added as a friend. Also,
added a copy of the worm itself to Boby's profile, so he is turned into an attacker.
To be sure, we will login as a Charlie and visit Boby's profile