Quantcast
Channel: linux – Logisek Security Blog
Browsing index pages (54 articles)

Encrypting a second hard drive

Open GParted and delete all partitions on the disk you want to encrypt Encrypt the partition sudo cryptsetup -y -v luksFormat /dev/sda Decrypt the new partition so that you can format it with ext4 sudo...

View Article


Nginx Hardening & Security Script

Tested on Debian 9.x https://github.com/maldevel/blue-team Hide nginx version sed -i "s/# server_tokens off;/server_tokens off;/g" /etc/nginx/nginx.conf Remove ETags sed -i 's/server_tokens...

View Article


SSH Hardening & Security Script

Tested on Debian 9.x https://github.com/maldevel/blue-team Set /etc/ssh/sshd_config ownership and access permissions chown root:root /etc/ssh/sshd_config chmod 600 /etc/ssh/sshd_config Change Port sed...

View Article

Network Hardening & Security Script

Tested on Debian 9.x https://github.com/maldevel/blue-team Disable IP forwarding sed -i "s/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=0/" /etc/sysctl.conf sysctl -w net.ipv4.ip_forward=0 Disable packet...

View Article

Basic iptables security script

Tested on Debian 9.x https://github.com/maldevel/blue-team Install iptables apt -y install iptables Install iptables-persistent apt -y install iptables-persistent systemctl enable netfilter-persistent...

View Article


Linux Users Hardening & Security Script

Tested on Debian 9.x https://github.com/maldevel/blue-team Set Maximum number of days a password may be used sed -i "s/^PASS_MAX_DAYS.*/PASS_MAX_DAYS 90/" /etc/login.defs Set Minimum number of days...

View Article

Apache Web Server Hardening & Security Script

Tested on Debian 9.x https://github.com/maldevel/blue-team Become root sudo su - Hide Apache2 version echo "ServerSignature Off" >> /etc/apache2/apache2.conf echo "ServerTokens Prod" >>...

View Article

Create an encrypted file container in Linux

Installations sudo apt-get install cryptsetup Create an empty file with the size of your container (e.g. 100MB) fallocate -l 100M mycontainer.img or dd if=/dev/urandom of=mycontainer.img bs=1M...

View Article


Apache2 and Django installation on Debian

Install Apache2 sudo apt-get install apache2 -y sudo rm -f /var/www/html/index.html && sudo touch /var/www/html/index.html sudo a2enmod ssl sudo a2ensite default-ssl sudo service apache2...

View Article


Linux notes and scripts for every day use

https://github.com/SwiftOnLinux/SmokingLinuxEveryDay Contents apache archlinux backup database debian dev documents encryption environment files gentoo misc openvpn samuraistfu security system web

View Article

Sublime editor on Debian

Installation https://www.sublimetext.com/3 sudo dpkg -i sublime-text_build-xxxx_amd64.deb Dracula Theme https://draculatheme.com/sublime/ Preferences -> Color Scheme -> Dracula Color Scheme ->...

View Article

p7zip – file archiver

p7zip is the Unix command-line port of 7-Zip, a file archiver that handles the 7z format which features very high compression ratios. p7zip provides: – /usr/bin/7zr – a standalone minimal version of...

View Article

Image may be NSFW.
Clik here to view.

Change admin passwords

System sudo passwd root MySQL mysqladmin -u root -p password PostgreSQL sudo -u postgres psql -U postgres -h 127.0.0.1 -d postgres -c "ALTER USER postgres WITH PASSWORD 'newpassword';" Gitlab GLPI...

View Article


Change tmux default shell

Edit tmux.conf vim ~/.tmux.conf Append this line: set-option -g default-shell $SHELL Restart tmux tmux kill-server tmux

View Article

VirusTotal Uploader for Debian

VirusTotal API Dependencies sudo apt-get install automake autoconf libtool libjansson-dev libcurl4-openssl-dev Download git clone https://github.com/VirusTotal/c-vtapi.git cd c-vtapi Compile autoreconf...

View Article


tmux – a terminal multiplexer

tmux is a terminal multiplexer. It enables a number of terminals to be created, accessed, and controlled from a single screen. tmux may be detached from a screen and continue running in the background,...

View Article

Debian – Awesome Zsh

Install zsh sudo apt-get install zsh Download prezto git clone --recursive https://github.com/sorin-ionescu/prezto.git ~/.zprezto Create symlinks setopt EXTENDED_GLOB; for rcfile in...

View Article


Get a list of Open Ports in Linux

netstat – Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships. Get a list of open tcp/udp ports sudo netstat -plntu -p = display...

View Article

Install owncloud client on Debian

The following guide works for Debian 8.x. Become root sudo su - Add owncloud repository echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Debian_8.0/ /' >...

View Article

Configure HP All-in-One device on Debian

Install hplip sudo apt-get install hplip Run the hp-setup wizard sudo hp-setup For Connection Type choose “Network/Ethernet..” If the device is not detected, click “Show advanced options”, tick “Manual...

View Article
Browsing index pages (54 articles)


Latest Images