This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ____ | |
| _________ / _/___ ___ _____ | |
| / ___/ __ \ / // __ \/ _ \/ ___/ | |
| (__ ) / / // // /_/ / __/ / | |
| /____/_/ /_/___/ .___/\___/_/ | |
| /_/ | |
| + -- --=[http://crowdshield.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """List manually installed debian packages | |
| Use as root or with sudo: | |
| python list_manually_installed_packages.py [date] | |
| output results to /var/log/manually_installed_software_<hostname>.csv | |
| Optional argument [date] will list only packages installed since that date. | |
| The date format is YYYYMMDD and be used e.g. as |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DATA TRANSFER | |
| The example in the previous section can be expanded to build a basic data transfer model. Any information input into one end of the connection will be output to the other end, and input and output can be easily captured in order to emulate file trans‐ | |
| fer. | |
| Start by using nc to listen on a specific port, with output captured into a file: | |
| $ nc -l 1234 > filename.out | |
| Using a second machine, connect to the listening nc process, feeding it the file which is to be transferred: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get update | |
| sudo apt-get upgrade | |
| dpkg -l linux-image-\* | grep ^ii | |
| kernelver=$(uname -r | sed -r 's/-[a-z]+//') | |
| echo $kernelver | |
| dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve $kernelver | |
| sudo apt-get purge linux-image-3.13.0-{34,35,36,37,40} | |
| sudo apt-get purge linux-headers-3.13.0-{34,35,36,37,40} |