I use this for my scanner.
Load:
pactl load-module module-loopback latency_msec=0
Unload:
pactl unload-module module-loopback
I use this for my scanner.
Load:
pactl load-module module-loopback latency_msec=0
Unload:
pactl unload-module module-loopback
Note: This article is a compilation of notes taken while reading Linux Basics for Hackers by OccupyTheWeb. Commands apply to Kali Linux, but can be used on most Debian based distributions. Also, descriptions for most commands have come from the man pages. Enjoy!
If no arguments are given, ifconfig displays the status of the currently active interfaces. If a single interface argument is given, it displays the status of the given interface only; if a single -a argument is given, it displays the status of all interfaces, even those that are down. Otherwise, it configures an interface.
Changing ip address of eth0: ifconfig eth0 <ip>
Changing ip, netmask and broadcast: sudo ifconfig eth0 <ip> netmask <ip> broadcast <ip>
Changing MAC Address: sudo ifconfig eth0 hw ether <address>
dig is a flexible tool for interrogating DNS name servers. It performs DNS lookups and displays the answers that are returned from the name server(s) that were queried. Most DNS administrators use dig to troubleshoot DNS problems because of its flexibility, ease of use, and clarity of output. Other lookup tools tend to have less functionality than dig.
Although dig is normally used with command-line arguments, it also has a batch mode of operation for reading lookup requests from a file. A brief summary of its command-line arguments and options is printed when the -h option is given. The BIND 9 implementation of dig allows multiple lookups to be issued from the command line.
Unless it is told to query a specific name server, dig tries each of the servers listed in /etc/resolv.conf. If no usable server addresses are found, dig sends the query to the local host.
When no command-line arguments or options are given, dig performs an NS query for "." (the root).
It is possible to set per-user defaults for dig via ${HOME}/.digrc. This file is read and any options in it are applied before the command-line arguments. The -r option disables this feature, for scripts that need predictable behavior.
The IN and CH class names overlap with the IN and CH top-level domain names. Either use the -t and -c options to specify the type and class, use the -q to specify the domain name, or use "IN." and "CH." when looking up these top-level domains.
be aware that in Linux some users refer DNS as BIND (Berkeley Internet Name Domain). Same thing ...
Changing DNS server via /etc/resolv.conf
IF using a DHCP address and the server provides DNS. when renewing DHCP address will replace file contents.
Local DNS file with /etc/hosts
Ensure to use tab between ip and domain name, not space.
Structure is: ip <Tab> hostname <Space> [aliases]...
apt search <package name>: can be used to search for the given regex(7) term(s) in the list of available packages and display matches. This can e.g. be useful if you are looking for packages having a specific feature. If you are looking for a package including a specific file try apt-file(1)
apt install, reinstall, remove, purge (apt-get(8)): Performs the requested action on one or more packages specified via regex(7), glob(7) or exact match. The requested action can be overridden for specific packages by appending a plus (+) to the package name to install this package or a minus (-) to remove it.
A specific version of a package can be selected for installation by following the package name with an equals (=) and the version of the package to select. Alternatively the version from a specific release can be selected by following the package name with a forward slash (/) and codename (bullseye, bookworm, sid ...) or suite name (stable, testing, unstable). This will also select versions from this release for dependencies of this package if needed to satisfy the request.
Removing a package removes all packaged data, but leaves usually small (modified) user configuration files behind, in case the remove was an accident. Just issuing an installation request for the accidentally removed package will restore its function as before in that case. On
the other hand you can get rid of these leftovers by calling purge even on already removed packages. Note that this does not affect any data or configuration stored in your home directory.
apt update: is used to download package information from all configured sources. Other commands operate on this data to e.g. perform package upgrades or search in and display details about all packages available for installation.
apt upgrade: is used to install available upgrades of all packages currently installed on the system from the sources configured via sources.list(5). New packages will be installed if required to satisfy dependencies, but existing packages will never be removed. If an upgrade for a package requires the removal of an installed package the upgrade for this package isn't performed.
From time to time I'll execute sudo apt update && sudo apt upgrade -y to update and upgrade all in one shot. remove the -y if you're not feeling adventurous.
Repositories contain packages for particular Linux distros. To add or remove repositories edit this file: /etc/apt/sources.list. Here's a decent explanation of the file.
When software is not available via a Linux repository, it may be available via GitHub. Do a search on GitHub. Copy the Code url and use the the following command to clone the software to a location on your computer. Also, prior to cloning a project always read up on the project's documentation. I highly recommend creating a GitHub account and start using with scripts and software you create.
Clones a repository into a newly created directory, creates remote-tracking branches for each branch in the cloned repository (visible using git branch --remotes), and creates and checks out an initial branch that is forked from the cloned repository’s currently active branch.
After the clone, a plain git fetch without arguments will update all the remote-tracking branches, and a git pull without arguments will in addition merge the remote master branch into the current master branch, if any (this is untrue when "--single-branch" is given; see below).
1 2 3 4 5 6
drwxr-xr-x 6 root root 103 Nov 13 13:43 charsets -rw-r--r-- 1 root root 240526 Jul 31 2020 hashcat.hcstat2 -rw-r--r-- 1 root root 23281 Jul 31 2020 hashcat.hctune drwxr-xr-x 2 root root 140 Nov 13 13:43 layouts drwxr-xr-x 2 root root 340 Nov 13 13:43 masks lrwxrwxrwx 1 root root 25 Jul 31 2020 modules -> ../../lib/hashcat/modules drwxr-xr-x 2 root root 26286 Nov 13 13:43 OpenCL drwxr-xr-x 3 root root 681 Nov 13 13:43 rules
The format of a symbolic mode is [ugoa...][[-+=][perms...]...], where perms is either zero or more letters from the set rwxXst, or a single letter from the set ugo. Multiple symbolic modes can be given, separated by commas.
A combination of the letters ugoa controls which users' access to the file will be changed: the user who owns it (u), other users in the file's group (g), other users not in the file's group (o), or all users (a). If none of these are given, the effect is as if (a) were given, but bits that are set in the umask are not affected.
The operator + causes the selected file mode bits to be added to the existing file mode bits of each file; - causes them to be removed; and = causes them to be added and causes unmentioned bits to be removed except that a directory's unmentioned set user and group ID bits are not affected.
The letters rwxXst select file mode bits for the affected users: read (r), write (w), execute (or search for directories) (x), execute/search only if the file is a directory or already has execute permission for some user (X), set user or group ID on execution (s), restricted deletion flag or sticky bit (t). Instead of one or more of these letters, you can specify exactly one of the letters ugo: the permissions granted to the user who owns the file (u), the permissions granted to other users who are members of the file's group (g), and the permissions granted to users that are in neither of the two preceding categories (o).
A numeric mode is from one to four octal digits (0-7), derived by adding up the bits with values 4, 2, and 1. Omitted digits are assumed to be leading zeros. The first digit selects the set user ID (4) and set group ID (2) and restricted deletion or sticky (1) attributes. The second digit
selects permissions for the user who owns the file: read (4), write (2), and execute (1); the third selects permissions for other users in the file's group, with the same values; and the fourth for other users not in the file's group, with the same values.
chmod never changes the permissions of symbolic links; the chmod system call cannot change their permissions. This is not a problem since the permissions of symbolic links are never used. However, for each symbolic link listed on the command line, chmod changes the permissions of the pointed-to file. In contrast, chmod ignores symbolic links encountered during recursive directory traversals.
Linux set permission defaults for files and directories as 666 and 777 respectively. But Debian systems umask is preconfigured to 022. umask subtracts from the default, so 666 becomes 644 and 777 becomes 755. Each user may modify their umask via ~/.profile file.
SUID (Set owner User ID up on execution) is a special type of file permissions given to a file. Users will get file owner’s permissions as well as owner UID and GID when executing a file/program/command.
To SUID using symbolic: chmod u+s <file name>
To SUID using numeric (octal): chmod 4750 <file name>
When a file has its SUID bit set long listing permissions will like: -rwsr-x---
SGID (Set Group ID up on execution) is a special type of file permissions given to a file/folder. Users will get file Group’s permissions when executing a Folder/file/program/command. When the bit is set on a directory new files created in that directory goes to the directory creator's group.
To SGID using symbolic: chmod g+s <file name>
To SGID using numeric (octal): chmod 2750 <file name>
When a file has its SUID bit set long listing permissions will like: -rwxr-s---
Sticky bit is a permision bit set on a directory, allowing a user to rename or delete files contained in it. This is a legacy function and not used anymore.
Exploiting SUID and SGID: Sometimes a developer may set the SUID bit of a program to access files that require root privileges. This allows a user to gain unintentional root privileges, providing the user do whatever they want. the following command will list all filesfor the root user with the permissions 4000: find / -user root -perm -4000
Similarly this can be done for SGID. Change -4000 to -2000 to find files/directories
After getting my amateur radio licenses (over a year ago), I switched from Linux to Windows because most software for my radios seem to only target Windows. Prior to the switch, I used Linux as my main computers (laptops and servers) for over 15 years, so this was done under extreme protest. How has it been going?
HORRIBLE!
I'm running a variety of Ubuntu Linux distribution known as Pop_OS! and have had several issues when for some reason or another Proton VPN is not shutdown gracefully leaving me without internet but still having LAN access.
Proton VPN appears to install an IPV6 "leak" interface which seems to be the problem.
The following instructions will usually bring back an internet connection..