=^.^=

Discover All Tenda Devices in ARP Database

karma

Tenda makes embedded devices that are frequently compromised and/or used in DoS attacks. You can actively scan or sniff for the following list of vendor IDs live but I wrote an SQL backed multi-router ARP table reporting system for an ISP years back. This query will locate all clients operating such a device.

select distinct `ip` from `arp` where ( `mac` like 'E8:65:D4%' or `mac` like 'D8:32:14%' or `mac` like 'CC:2D:21%' or `mac` like 'C8:3A:35%' or `mac` like 'B8:3A:08%' or `mac` like 'B4:0F:3B%' or `mac` like 'B0:DF:C1%' or `mac` like '58:D9:D5%' or `mac` like '50:2B:73%' or `mac` like '50:0F:F5%' or `mac` like '08:40:F3%' or `mac` like '04:95:E6%' )

I have had enough problems with these devices that I suggest preemptively locating them, blocking typical remote management/access ports upstream and have all affected users return or upgrade their router. Follow up and remove corresponding upstream rules once the devices have been removed (use arping to verify) to recover netfilter resources.

Search All Files Recursively for a String

karma

To recursively search all files under /path for a given string run:

find / -xdev f -type -print0 | xargs -0 grep -H "string"

The -xdev argument ignores other filesystems mounted under the given path, avoiding /proc and /dev for example. If, for example, your /home folder is on a different partition, it won't be searched. Run the command again on that specific path.

Some other common filesystem search patterns are covered in:

Find all Hidden Files and Directories on Linux and UNIX-Like Systems (BSD, Solaris)

karma

To search for all "hidden" files and directories (those with filenames beginning with .) run:

find /dir/to/search/ -name ".*" -print find /dir/to/search/ -name ".*" -ls

Only files:
find /dir/to/search/ -type f -iname ".*" -ls

Only directories:
find /dir/to/search/ -type d -iname ".*" -ls

More...

Some other common filesystem search patterns are covered in:

youtube-dl Command Line for Downloading a YouTube Playlist as MP3s

karma

So I don't have to go looking for this again:
youtube-dl --yes-playlist --extract-audio --audio-format mp3 --audio-quality 0 --keep-video --metadata-from-title "%(artist)s - %(title)s" Playlist URL
--embed-thumbnail errored out after the first conversion for me :(

debian-10 TemplateVM Does Not Install Correctly on Qubes

karma

For reasons unknown I have experienced an unclean installation of the Debian 10 TemplateVM under Qubes 4.0.3. Symptoms include:

  • The only menu entry for debian-10 is Start
  • The TemplateVM and derivative AppVMs does not start

It is easy to re-install the template; from dom0:
sudo dnf qubes-dom0-update --enablerepo=qubes-templates-itl --action=reinstall qubes-template-debian-10
It should be noted that an alternative minimal installation template is available which can be installed thus:
sudo dnf qubes-dom0-update --enablerepo=qubes-templates-itl qubes-template-debian-10-minimal
Due to the large size of these packages it is probably worth clearing the package cache post-installation:
sudo dnf clean packages