Driftnet on Debian: Sniffing images within a network

29/12/2020
In this tutorial we’ll sniff a network to intercept graphical content from the devices’ traffic.We’ll learn how to intercept information delivered through unencrypted protocols such as HTTP.

In this case we will intercept images, we’ll discover images being downloaded or uploaded by users as generated by camera devices, in the next article we’ll scan for credentials.

The main tools to carry out this sniffing are Ettercap and Driftnet, initially this tutorial was meant to include credentials too but after finding all tutorials online on Driftnet are not complete I prefered to leave it dedicated to users with difficulties sniffing images, the process is pretty simple but all steps must be carried out, probably other tutorials are focused on Kali which brings by  default proper settings for the program to work since it’s execution and thi is not the case for many users.

In this case I have access to a wired network but if you need help on forcing access to someone else’s network you can check previous articles on this subject published on LinuxHint.

Installing proper packages

Ettercap: featured by it’s own website as a suite for “Man In the Middle” attacks. To install it just run:

apt  install ettercap-text-only -y
apt install ettercap-graphical  -y

Wireshark: featured as a packets analyzer. To install it run:

apt install wireshark -y

In my case some tools are already installed and Linux informs it is already installed and updated.

Driftnet: This is a sniffer for images featured on Kali Linux, to install it on Debian or Ubuntu just run:

apt install driftnet -y

Capturing images from the network

Once you installed the proper software, let’s start intercepting images, in order to be able to intercept traffic without blocking the “victim” connection we need to enable the ip_forward, to do so execute:

echo "1">/proc/sys/net/ipv4/ip_forward

Then to start analyzing the network execute:

ettercap -Tqi enp2s0 -M arp:remote

Where enp2s0 set your network device.

Wait for the scan to end. Then run driftnet in a new terminal as shown below:

driftnet -i enp2s0   (remember to replace enp2s0 for your proper network card, e.g wlan0 or eth0)

As you can see a black window  prompted with two images which surely are being transferred through unsafe protocols (http). You can also see some errors in the terminal next to the black window, these errors refer both to corrupt images (to driftnet) or false positive in the traffic.
Let the scan progress and driftnet will obtain new images if available in the network.

Ignore the background program and focus on the black square which you can resize with your mouse to see images in a more comfortable way.

As you see images vary according as the scan process of the network continues.

Finally driftnet will store all images at the directory or partition /tmp, you can see driftnet’s subdirectories by running

ls /tmp

or

cd /tmp

Protecting your network against this attack

The most basic way to avoid getting sniffed and protect your privacy through your network is to use secure protocols only, try to redirect all traffic only through secure protocols like HTTPS or SFTP instead of HTTP or FTP to give a couple of examples. Using IPsec in your network and keeping your LAN and WAN separated are also good recommendations to hide the content you interact with and avoid external attempts to access through wifi.

In our next tutorials I’ll show you how to sniff credentials sent through unencrypted protocols too, usernames, passwords and maybe other useful information like website URLs visited by the devices attached to the network.

I hope you’ll find this tutorial helpful, keep in touch with LinuxHint for more tips and tutorials on Linux.

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

Top 5 Vulnerability Scanning Tools

The process of recognition, categorization and mitigation of vulnerabilities present in a network or application is called...
29/12/2020

Memcached DDOS Vulnerabilities Impacting The Internet March 2018

Apparently in recent times Memcached has become exploitable, and this exploit is floating around the Internet.  The vulnerabilities...
28/12/2020

/dev/random vs /dev/urandom and are they secure?

Getting Started Who would have thought generating a random number would be such a mess, it is supposed to be just as straight-forward...
29/12/2020
Bài Viết

Bài Viết Mới Cập Nhật

Mua proxy v4 chạy socks5 để chơi game an toàn, tốc độ cao ở đâu?
18/05/2024

Thuê mua proxy Telegram trọn gói, tốc độ cao, giá siêu hời
18/05/2024

Thuê mua proxy Viettel ở đâu uy tín, chất lượng và giá tốt? 
14/05/2024

Dịch vụ thuê mua proxy US UK uy tín, chất lượng số #1
13/05/2024

Thuê mua proxy Việt Nam: Báo giá & các thông tin MỚI NHẤT
13/05/2024