Now that you've completed the phishing simulation, let's examine the results. This final step will show you how to access and interpret the data collected by the Social Engineer Toolkit (SET), as well as properly clean up your testing environment to maintain security best practices.
-
First, we'll view the complete SET log file which contains all captured credentials in their raw format. This file is stored in a protected system location, so we need to use sudo
:
sudo cat /var/lib/set/logs/set.log
This command displays the contents of SET's main log file, where all captured credentials are automatically stored during the phishing simulation.
-
For better organization and future reference, let's create a working copy of this data in your project directory. We'll also change the file ownership to your lab user account:
cd ~/project
sudo cp /var/lib/set/logs/set.log captured_credentials.txt
sudo chown labex:labex captured_credentials.txt
The chown
command ensures you have proper permissions to work with this file without needing sudo
for subsequent operations.
-
Now let's view the formatted report we just created:
cat captured_credentials.txt
You should see structured output similar to this example, showing the captured credentials along with timestamps and source information:
[*] 2023-11-15 14:30:22 - Credentials captured:
Username: testuser
Password: Test123!
IP Address: 127.0.0.1
-
It's important to clean up your testing environment after completing the exercise. This removes the phishing page we created and stops the web server:
sudo rm /var/www/html/index.html
sudo service apache2 stop
These commands ensure no residual testing materials remain that could pose security risks.
-
Finally, let's document our findings by creating a summary report that counts how many credentials were captured:
echo "Phishing Test Results" > test_summary.txt
echo "Total credentials captured: $(grep -c 'Username' captured_credentials.txt)" >> test_summary.txt
cat test_summary.txt
This creates a simple report showing the total number of credential pairs captured during your test. The grep -c
command counts how many times 'Username' appears in your captured data file.