Skip to content

Instantly share code, notes, and snippets.

@AbdullahGhani1
Last active August 29, 2022 23:20
Show Gist options
  • Save AbdullahGhani1/5ac72a64c132e68a2ddc9252a84ddef4 to your computer and use it in GitHub Desktop.
Save AbdullahGhani1/5ac72a64c132e68a2ddc9252a84ddef4 to your computer and use it in GitHub Desktop.

Click on ✔ and Do The Task Again

During a routine security audit, the team identified an issue on the Nautilus App Server. Some malicious content was identified within the website code. After digging into the issue they found that there might be more infected files. Before doing a cleanup they would like to find all similar files and copy them to a safe location for further investigation. Accomplish the task as per the following requirements:

  1. On App Server 3 at location /var/www/html/blog find out all files (not directories) having .js extension.
  2. Copy all those files along with their parent directory structure to location /blog on same server.
  3. Please make sure not to copy the entire /var/www/html/blog directory content.

SSh on App Server According To Task

ssh tony@stapp01  # App server 1
ssh steve@stapp02 # App server 2
ssh banner@stapp03 # App server 3
sudo find /var/www/html/media -type f -name '*.js' -exec cp --parents {} /media \;    
# Replace media according to Task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment