Showing posts with label Malware. Show all posts
Showing posts with label Malware. Show all posts

VM for ransomware investigations

 My laundry list of tools/software useful when investigating ransomware cases.

 

Tor: Obviously need this to access Onion sites.

qBittorrent: Download leaked data from Torrent files.  

Peazip: Extract archives containing leaked data.  

unrar: Extract archives containing leaked data.  

LibreOffice: Read leaked documents. 

SSH: Transfer files from VM to host.  

 

Any suggestions what other tools you guys use? 

Modded script to keep Ubuntu packages and snaps updated.

Used Copilot to update my Ubuntu maintenance script. I did tweak it slightly though since I am running LTS and don't want all packages to be updated to the latest version.


#!/bin/bash

# Function to handle errors
function handle_error {
  echo "$1 Exiting."
  exit 1
}

# Function to update apt packages
function update_apt {
  echo "Updating apt package lists..."
  sudo apt update || handle_error "Error updating apt package lists."
 
  echo "Upgrading apt packages..."
  sudo apt upgrade -y || handle_error "Error upgrading apt packages."
 
  echo "Cleaning up apt packages..."
  sudo apt autoremove -y && sudo apt clean || handle_error "Error cleaning up apt packages."
}

# Function to update snap packages
function refresh_snaps {
  echo "Updating Snap packages..."
  sudo snap refresh
  if [[ $? -ne 0 ]]; then
    echo "Refresh failed. Attempting to kill running Snap processes..."
    sudo pkill -f snap
    sudo snap refresh || handle_error "Error updating Snap packages after killing processes."
  else
    echo "Snap packages updated successfully."
  fi
}

# Function to update Maldet database and run a scan
function run_maldet {
  echo "Updating Maldet database..."
  sudo maldet -u || handle_error "Error updating Maldet database."
 
  echo "Starting Maldet scan of /home (recent changes, quiet mode)..."
  sudo maldet -r -q /home || handle_error "Error running Maldet scan."
 
  SCAN_LOG=$(sudo maldet --report list | tail -n 1 | awk '{print $NF}')
  if [[ -n "$SCAN_LOG" ]]; then
    echo "Maldet scan log located at: $SCAN_LOG"
  else
    echo "Could not retrieve Maldet scan log location."
  fi
}

# Main script execution
update_apt
refresh_snaps
run_maldet

echo "All done!"

Browser security updated

It has been awhile since I have updated this "Blog" and decided to start by refreshing my list of recommended "Firefox" security addons.

Browser security

I was asked by a friend to recommend a list of tools to protect his browser and secure his surfing experience.
A picture speaks a thousand words.

"SecureBrowsing"

My latest column explores the "Firefox" addon called "SecureBrowsing". Here is the excerpt.
"The Internet is a dangerous place to venture because it is rife with websites hosting malware and malicious code deployed o compromise your systems. How do you thwart hackers from fulfilling their insidious objectives?"

"WebHTTrack"

My latest column on the "Linux" version of "HTTrack". Here is the excerpt.
"HTTrack Website Copier is aopen source tool to download an entire website from the Internet locally onto your desktop for offline browsing. It is a Windowssoftware that spawned WebHTTrack, its Linux/Unix/BSDrelease. The tool dumps and mirrors the complete contents of the source website you specify to a local directory by replicating the exact directory structure, files and links.
This is beneficial for a security practitioner who wants to perform offline security testing against a website without impacting the server hosting it ."


The latest issue of "Hakin9" also features an article by my friend, Remus Ho.

"Windows Update" compromised

A lot of news recently about "Flame" and one method that the malware used to spread itself was via "Windows Update". Fascinating read.

Common sense

Technology is never foolproof and here is an excellent example where common sense is overwhelmingly essential.
I received the highlighted link in my Gmail which wasn't marked as spam. A quick glance at the path and I knew this was obviously a ruse but I wondered why Gmail's spam detection didn't pick this up. I quickly ran the suspicious link against the scanners hosted on VirusTotal and was utterly disappointed that not a single engine was able to mark it as malicious.

My first column

Hakin9 asked me to be a bimonthly contributor to their new column entitled "Tool Time" and here is an excerpt of it.
"Hispasec Sistemas has managed the service, VirusTotal, since 1st June 2004. The website (http://www.virustotal.com) offers the public access to multiple Antivirus (AV) engines hosted by them to provision online scanning of individual files to uncover malware by harnessing a combination of signature-based and heuristic detection."

“aspydrv.asp;.jpg”

Was reading this article about an alleged Anonymous hacker uploading a file “aspydrv.asp;.jpg” onto servers to compromise them.
This piqued my interest. I Googled the above file and found numerous sites hosting this file. Further research educated me that using the ";.jpg" at the end of the ASP file can fool insecure IIS servers.
Accessing one of the vulnerable sites, I try uploading a test ASP page written by my buddy, Simon, and the file successfully bypasses the file type check. I click on the uploaded ASP page and the "Hello World" message is published on my browser.
It is a simple trick to gain control of a vulnerable webserver but timely patching and hardening will thwart this threat.

No password needed

New malware targeting Mac OS X that will not prompt users to enter their administrator password before infecting the victim's machine. Mac users and Apple can continue to be in denial but it is a reality now.
Install an AV on your Mac.

Websense Defensio

It has been almost 2 years since I last went to a Security seminar. I strongly believe that you learn when you attend an event with good content. Today was a classic example. I was enlightened about the available of a free service from "Websense" called "Defensio". It is a tool for social mediums to protect both users and their followers against threats in the form of unruly followers or hackers.
It is available as an app in "Facebook". Type "Defensio" into the search box to find it listed under "Applications". Add the app and allow it access to your profile to protect it. Access the settings section and choose your desired configurations. I tried posting an adult link to my wall and it was successfully blocked by "Defensio".

Cross-platform Trojan

Cross-platform Trojan that infects Windows, Mac and Linux machines via Java. Interestingly enough, the Trojan is not persistent in Linux as it cannot survive reboots.
A breakdown of the infection rate by OS can be found here.

Automated social engineering

Cool POC. It again demonstrates how humans are the weakest link in security. You can educate people and display warnings but victims will still click on malicious links.

Embedded files

Lumension vendor visited the office. During their presentation, they mentioned whitelisting and blacklisting files to tackle data leakage. I inquired if the Lumension agent was able to detect blacklisted files (eg. executables, audio) embedded inside whitelisted files (Office documents). The vendor couldn't answer my question.
That piqued my curiosity. I embedded the same PDF file inside a Word doc twice by manually copying and pasting it into the doc as well as inserting it as an object. Firing up my trusty Hex editor, I was only able to find the magic bytes (ie. ASCII "%PDF" or hex values "25 50 44 46") for the PDF file that was embedded using the insert object method. I was not able to detect the embedded PDF file that was manually copied.

This is an interesting loophole from a hacker and forensics perspective.

"An error occured in avast! engine: Invalid argument"

This annoying message popped up after I ran the update in avast! in Ubuntu yesterday. avast! crashes every time I attempt to launch it after that. Did some googling and someone suggested deleting a file called "400.vps" in the ".avast" folder. I did just that and avast! was able to launch again. However, the same error occurs immediately after the virus definition update is performed. There is an error with the signature file. Hmmmmmm. What happened to quality control nowadays?

Update: I resolved the update issue. Run the following command.

commandrine@bridge:/$ sudo sysctl -w kernel.shmmax=128000000
kernel.shmmax = 128000000
commandrine@bridge:/$

I combined this command and the avast! update command together in this script to simplify matters. You no longer need to launch the avast! GUI to start the update. Download it here.

Justified

Adobe Reader is officially the most exploited software. My decision to remove Adobe Reader from my machines years ago is now fully justified and not a choice out of paranoia. In 2nd place is Microsoft Word which is also not installed on any of my systems at home.
A case of security by obscurity? Why do soldiers wear camouflage when they can be killed by weapons of mass destruction?

The economics of malware

Interesting read about the driving force behind malware writing and distribution.
Whilst we are on the topic of malware... malicious PDF installs backdoor on victim’s system and dials home to Singapore hosted server*. Nice!!!
Anyone wants to call Alan to give him the bad news?

* First came across this cool story on werew01f's blog.

Ubuntu maintenance script

 Wrote a simple script for keeping packages and snaps updated in Ubuntu.