Showing posts with label basic. Show all posts
Showing posts with label basic. Show all posts
--[ find, grep, sed, awk ]
find
- The Geek Stuff – 15 Find Commands
- The Geek Stuff – 15 More Find Commands
- IBM – Advanced Find Techniques
grep
--[ links ]
DIY Web Pentesting Tools on Ubuntu
Arachni on Ubuntu 14.04 LTS
BeEF on Ubuntu 14.04 LTS
Burp Suite on Ubuntu 14.04 LTS
CMSMap on Ubuntu 14.04 LTS
Commix on Ubuntu 14.04 LTS
HconSTF on Ubuntu 14.04 LTS
John on Ubuntu 14.04 LTS
Masscan on Ubuntu 14.04 LTS
Metasploit Framework on Ubuntu 14.04 LTS
NMap on Ubuntu 14.04 LTS
NetCat on Ubuntu 14.04 LTS
NoSQLMap on Ubuntu 14.04 LTS
Recon-ng on Ubuntu 14.04 LTS
SET on Ubuntu 14.04 LTS
SQLMap on Ubuntu 14.04 LTS
Arachni on Ubuntu 14.04 LTS
BeEF on Ubuntu 14.04 LTS
Burp Suite on Ubuntu 14.04 LTS
CMSMap on Ubuntu 14.04 LTS
Commix on Ubuntu 14.04 LTS
HconSTF on Ubuntu 14.04 LTS
John on Ubuntu 14.04 LTS
Masscan on Ubuntu 14.04 LTS
Metasploit Framework on Ubuntu 14.04 LTS
NMap on Ubuntu 14.04 LTS
NetCat on Ubuntu 14.04 LTS
NoSQLMap on Ubuntu 14.04 LTS
Recon-ng on Ubuntu 14.04 LTS
SET on Ubuntu 14.04 LTS
SQLMap on Ubuntu 14.04 LTS
--[ Recover your wifi password on windows]
C:\Users\jpdltd>netsh wlan show profile
Profiles on interface Wi-Fi:
Group policy profiles (read only)
---------------------------------
User profiles
-------------
All User Profile : Anothernetwork
Current User Profile : myhomenetwork
C:\Users\jpdltd>netsh wlan show profile myhomenetwork key=clear
Profile myhomenetwork on interface Wi-Fi:
=======================================================================
Applied: Current User Profile
Profile information
-------------------
Version : 1
Type : Wireless LAN
Name : myhomenetwork
Control options :
Connection mode : Connect automatically
Network broadcast : Connect only if this network is broadcasting
AutoSwitch : Switch to more preferred network if possible
MAC Randomization : Disabled
Connectivity settings
---------------------
Number of SSIDs : 1
SSID name : "myhomenetwork"
Network type : Infrastructure
Radio type : [ Any Radio Type ]
Vendor extension : Not present
Security settings
-----------------
Authentication : WPA2-Personal
Cipher : CCMP
Authentication : WPA2-Personal
Cipher : Unknown
Security key : Present
Key Content : MyS3cr3tPassW0RD!
Cost settings
-------------
Cost : Unrestricted
Congested : No
Approaching Data Limit : No
Over Data Limit : No
Roaming : No
Cost Source : Default
Bash Commands
a
alias Create an alias •
apropos Search Help manual pages (man -k)
apt-get Search for and install software packages (Debian/Ubuntu)
aptitude Search for and install software packages (Debian/Ubuntu)
aspell Spell Checker
awk Find and Replace text, database sort/validate/index
b
alias Create an alias •
apropos Search Help manual pages (man -k)
apt-get Search for and install software packages (Debian/Ubuntu)
aptitude Search for and install software packages (Debian/Ubuntu)
aspell Spell Checker
awk Find and Replace text, database sort/validate/index
b
--[ Installing Grub Customizer ]
Grub Customizer Installation
To install Grub Customizer 4.0.6 on Debian 7&8
su -
# apt-get install build-essential cmake libgtkmm-3.0-dev libssl-dev gettext libarchive-dev
# wget https://goo.gl/qQnUhK -O grub-customizer_4.0.6.tar.gz
# tar xfv grub-customizer_4.0.6.tar.gz
# cd grub-customizer_4.0.6.tar.gz
# cmake . && make -j3
# make install
Start Grub Customizer with :
# grub-customizer
Grub Customizer Removal (Optional)
To uninstall
# su -
# wget https://goo.gl/qQnUhK -O grub-customizer_4.0.6.tar.gz
# tar xfv grub-customizer_4.0.6.tar.gz
# cd grub-customizer_4.0.6.tar.gz
# make uninstall
To install Grub Customizer 4.0.6 on Debian 7&8
su -
# apt-get install build-essential cmake libgtkmm-3.0-dev libssl-dev gettext libarchive-dev
# wget https://goo.gl/qQnUhK -O grub-customizer_4.0.6.tar.gz
# tar xfv grub-customizer_4.0.6.tar.gz
# cd grub-customizer_4.0.6.tar.gz
# cmake . && make -j3
# make install
Start Grub Customizer with :
# grub-customizer
Grub Customizer Removal (Optional)
To uninstall
# su -
# wget https://goo.gl/qQnUhK -O grub-customizer_4.0.6.tar.gz
# tar xfv grub-customizer_4.0.6.tar.gz
# cd grub-customizer_4.0.6.tar.gz
# make uninstall
--[ GNU GRUB Manual 2.00 ]
GNU GRUB manual 1 Introduction to GRUB 1.1 Overview 1.2 History of GRUB 1.3 Differences from previous versions 1.4 GRUB features 1.5 The role of a boot loader 2 Naming convention 3 Installation
--[ Archlinux on RPI2 ]
SD Card Creation
Replace sdX in the following instructions with the device name for the SD card as it appears on your computer.
Start fdisk to partition the SD card:
fdisk /dev/sdX
At the fdisk prompt, delete old partitions and create a new one:
-Type o. This will clear out any partitions on the drive.
-Type p to list partitions. There should be no partitions left.
-Type n, then p for primary, 1 for the first partition on the drive, press ENTER to accept the default first sector, then type +100M for the last sector.
-Type t, then c to set the first partition to type W95 FAT32 (LBA).
-Type n, then p for primary, 2 for the second partition on the drive, and then press ENTER twice to accept the default first and last sector.
-Write the partition table and exit by typing w.
Create and mount the FAT filesystem:
mkfs.vfat /dev/sdX1
mkdir boot
mount /dev/sdX1 boot
Create and mount the ext4 filesystem:
mkfs.ext4 /dev/sdX2
mkdir root
mount /dev/sdX2 root
Download and extract the root filesystem (as root, not via sudo):
wget http://archlinuxarm.org/os/ArchLinuxARM-rpi-2-latest.tar.gz
bsdtar -xpf ArchLinuxARM-rpi-2-latest.tar.gz -C root
sync
Move boot files to the first partition:
mv root/boot/* boot
Unmount the two partitions:
umount boot root
Insert the SD card into the Raspberry Pi, connect ethernet, and apply 5V power.
Use the serial console or SSH to the IP address given to the board by your router.
Login as the default user alarm with the password alarm.
The default root password is root.
Replace sdX in the following instructions with the device name for the SD card as it appears on your computer.
Start fdisk to partition the SD card:
fdisk /dev/sdX
At the fdisk prompt, delete old partitions and create a new one:
-Type o. This will clear out any partitions on the drive.
-Type p to list partitions. There should be no partitions left.
-Type n, then p for primary, 1 for the first partition on the drive, press ENTER to accept the default first sector, then type +100M for the last sector.
-Type t, then c to set the first partition to type W95 FAT32 (LBA).
-Type n, then p for primary, 2 for the second partition on the drive, and then press ENTER twice to accept the default first and last sector.
-Write the partition table and exit by typing w.
Create and mount the FAT filesystem:
mkfs.vfat /dev/sdX1
mkdir boot
mount /dev/sdX1 boot
Create and mount the ext4 filesystem:
mkfs.ext4 /dev/sdX2
mkdir root
mount /dev/sdX2 root
Download and extract the root filesystem (as root, not via sudo):
wget http://archlinuxarm.org/os/ArchLinuxARM-rpi-2-latest.tar.gz
bsdtar -xpf ArchLinuxARM-rpi-2-latest.tar.gz -C root
sync
Move boot files to the first partition:
mv root/boot/* boot
Unmount the two partitions:
umount boot root
Insert the SD card into the Raspberry Pi, connect ethernet, and apply 5V power.
Use the serial console or SSH to the IP address given to the board by your router.
Login as the default user alarm with the password alarm.
The default root password is root.
--[ Installing Chrome on Kali ]
Download .deb :
https://www.google.com/chrome/browser/desktop/index.html
In a terminal:
#cd ~/Downloads
#dpkg -i google-chrome-stable_current_amd64.deb
errors are fine, continue with :
apt-get install libappindicator1
and
apt-get -f install
to install dependencies.
https://www.google.com/chrome/browser/desktop/index.html
In a terminal:
#cd ~/Downloads
#dpkg -i google-chrome-stable_current_amd64.deb
errors are fine, continue with :
apt-get install libappindicator1
and
apt-get -f install
to install dependencies.
--[ Virtualbox Headless VM server ]
A tutorial how to install virtualbox for VM's on a headless server, combined with a webif to manage it all.
--[ Add sudo user to Kali ]
Open a terminal and issue the following command.
#useradd -m
-m creates a home directory for the user.
Now we have to set a password for the user.
#passwd
It will ask you to create a new password.
At this point, we have a new user account. But we might want to add our new user to the “sudoers” group, so that we can use “sudo” to do administrative actions.
#usermod -a -G sudo
The option -a means to add and ‘-G sudo’ means to add the user to the sudo group. If you want to know more about the usermod command, issue #man usermod command to know more about usermod
Now we have to specify the shell for our new user.
#chsh -s /bin/bash
chsh command is used to change the login shell for a user.
All done.! you are all set. You could logout and login to your new account.
#useradd -m
-m creates a home directory for the user.
Now we have to set a password for the user.
#passwd
It will ask you to create a new password.
At this point, we have a new user account. But we might want to add our new user to the “sudoers” group, so that we can use “sudo” to do administrative actions.
#usermod -a -G sudo
The option -a means to add and ‘-G sudo’ means to add the user to the sudo group. If you want to know more about the usermod command, issue #man usermod command to know more about usermod
Now we have to specify the shell for our new user.
#chsh -s /bin/bash
chsh command is used to change the login shell for a user.
All done.! you are all set. You could logout and login to your new account.
--[ Boot RPI with NFS storage ]--
Booting XBMC OpenELEC with NFS storage
I have had a raspberry pi type B for a few weeks now and one problem that I have is on the SD card which can get stressed and corrupt XBMC data. I was looking for a solution tonight and eventually stepped on it reading a few pages from the wiki. Since I still want to use the SD card, I just changed/flash/cmdline.cfg to contain this:
1
| ip=dhcp boot=/dev/mmcblk0p1 disk=NFS=192.168.0.66:/media/xbmc |
Of course, you will need to change the NFS server and mount point as they are likely to be different. Worth noting that I rsync’d the content of /dev/mmcblk0p2 (/storage in OpenELEC) so I would not have to scan my whole collection again.
There is also a full procedure to netboot your Raspberry Pi but this did not appeal to me, details there.
--[ ufw ]
It should be installed by default in Ubuntu, but if for some reason it’s not, you can install the package using aptitude or apt-get using the following commands:
sudo apt-get install ufw
Check the Status
sudo apt-get install ufw
Check the Status
--[ Ubuntu 14.04 hardening ]
Assume that all these operations need to be performed as root, which you can either do with
sudo or by logging in as root first. (I've noticed that Ubuntu users seem particularly averse to logging in as root, apparently preferring instead to issue an endless series of commands starting with sudo, but I'm afraid that kind of extra hassle is not for me, so I just log in as root first.)Harden SSH
--[ Set session type to text or graphical ]
Get the current session type, text-mode or lightdm+xfce:
Set the current session type to text-mode by disabling lightdm autostart:
Enable lightdm autostart:
Code:
systemctl get-default
Code:
systemctl set-default multi-user.target
Code:
systemctl set-default graphical.target
--[ Setup SSH private key ]
—Create the RSA Key Pair
The first step is to create the key pair on the client machine (there is a good chance that this will just be your computer):
# ssh-keygen -t rsa
The first step is to create the key pair on the client machine (there is a good chance that this will just be your computer):
# ssh-keygen -t rsa
--[ IP at logonprompt ]
A script that will rewrite /etc/issue with the IP address when the network interface is brought up.
--[ ssh access ]
There are several open source and enterprise software program through
which we can access remote system. These software becomes a necessity
when you setup a remote server and do not allow direct access to the
server, as because of some security measures. PuTTy is one of the major
terminal emulator through which we can access a remote server. PuTTy is a
free and open-source terminal emulator, serial console and network file
transfer application. It supports several network protocols, including
SCP, SSH, Telnet and rlogin. Here, I am going to show you how to access
Kali Linux through PuTTy. My base computer is running Windows 7 and Kali
Linux is installed in a VMWare Player. So we can assume that Kali Linux
is installed in a remote machine, as Windows 7 and of Kali Linux is on
different network now.
Before we access Kali Linux through remote system, we need to make sure that ssh service is already running in Kali Linux.
Subscribe to:
Posts (Atom)