Archive

Archive for the ‘Uncategorized’ Category

Kali Tools

October 19, 2017 Leave a comment

# Check for rootkits on local system
chkrootkit

 

Advertisements
Categories: Kali Linux, Uncategorized

portmap dead but subsys locked

October 19, 2017 Leave a comment

I have seen this issue and my feeling is it is a result of vulnerability scanners knocking the portmap service that handles the registration of systems for remote NFS, autofs.

Symptoms you may see:
Could not mount a user’s home directory:

su: warning: cannot change directory to /home/<user>: No such file or directory
# rpcinfo -p <nfs_server>
rpcinfo: can’t contact portmapper: RPC: Remote system error – Connection refused
# showmount -e
mount clntudp_create: RPC: Port mapper failure – RPC: Unable to receive

Resolution:
On NFS server if you see this error:

# service portmap status
portmap dead but subsys locked
# ll /var/lock/subsys/portmap    # If file exists, it has to be removed
# rm /var/lock/subsys/portmap
# service portmap restart
# rpcinfo -p
# service nfs restart    # Needs to be restarted to register with portmapper

Now, you should be able to run “rpcinfo -p <nfs_server>” from the NFS clients and mount the shares.

 

Categories: Linux, Redhat, Uncategorized

Kali SSH setup

October 17, 2017 Leave a comment

Move default keys to backup folder:
# cd /etc/ssh; mkdir backup_ssh; mv ssh_host_* backup_ssh
# dpkg-reconfigure openssh-server

Allow root to login
Edit /etc/ssh/sshd_config, add or change line to:
PermitRootLogin yes

Restart SSH
# service ssh stop; service ssh start; service ssh status

Kali Linux Updating Notes

October 17, 2017 Leave a comment

Run in a cron or in a shell script:
apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y

apt-get install <package>
apt-get remove <package>
# List packages installed
dpkg -l
# list info about a package
apt-cache show <package>

# Repos where updates are retrieved
/etc/apt/sources.list

# Packages that speed up tools (may not be available for Kali 2.x)
apt-get install preload -y
# Increase privacy by removing temp files, cooks, caches, etc.
apt-get install bleachbit -y
# Remove unnecessary services; install Boot Up Manager
apt-get install bum -y
# Powers commands from keyboard
apt-get install gnome-do -y
# Search within apt system
apt-get install apt-file -y
# Deletion program that complies with govt standards
apt-get install scrub -y
# Capture screenshots of desktop
apt-get install shutter -y
# Print company name in header
apt-get install figlet -y
echo “figlet YOUR_COMPANY” >> ~/.bashrc

# Install TOR
apt-get install tor -y
# Edit /etc/proxychains.conf, change:
#strict_chain
dynamic_chain
socks5 127.0.0.1 9050

# Start TOR service
service tor start
proxychains iceweasel http://www.whatismyip.com

 

 

Categories: Kali Linux, Uncategorized

Samba CIFS mounts and securing user password

October 15, 2017 Leave a comment

Adding the code blocks below to /etc/rc.local:

mount.cifs //<host1>/share /<mount_point> -o ro,credentials=/root/.cifs.<host1>,remount

Option “remount” prevents double mounting of the same share.

File .cifs.<hostname> contains:

user=<user>
password=<password>
domain=<domain>

Categories: Linux, Redhat, Uncategorized

RHEL 6 IGMPv3 setting

August 11, 2017 Leave a comment

Set following parameter in /etc/sysctl.conf file for the interface that is desired (e.g. bond0, eth0, etc.).

net.ipv4.conf.eth0.force_igmp_version=3
  • Reboot system
Categories: Linux, Redhat, Uncategorized

Vagrantfile

Working vagrantfile I want to keep as a sample template:

 

# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = “2”
Vagrant.require_version “>= 1.7.2”

# All Vagrant configuration is done below. The “2” in Vagrant.configure
# configures the configuration version. Please don’t change it unless you know what
# you’re doing.
Vagrant.configure(2) do |config|

config.vm.box = “<user>/openshift-origin”
#uncomment this line if you downloaded the box and want to use it instead
#config.vm.box = “openshift3”
config.vm.box_check_update = false
config.vm.network “private_network”, ip: “10.2.2.2”
config.vm.synced_folder “.”, “/vagrant”, disabled: true
config.vm.hostname = “origin”
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing “localhost:8080” will access port 80 on the guest machine.
# config.vm.network “forwarded_port”, guest: 80, host: 8080
#config.vm.network “forwarded_port”, guest: 80, host: 1080
#config.vm.network “forwarded_port”, guest: 443, host: 1443
#config.vm.network “forwarded_port”, guest: 5000, host: 5000
#config.vm.network “forwarded_port”, guest: 8080, host: 8080
#config.vm.network “forwarded_port”, guest: 8443, host: 8443

config.vm.provider “virtualbox” do |vb|
# vb.gui = true
vb.memory = “8192”
vb.cpus = 2
vb.name = “origin-1.1.2”
end

end

Categories: Uncategorized