HomeLinux / Kali Linux after new installation

Linux after new installation

Posted in : Linux / Kali on by : Jesper

After new installation

New user and Root password

Add user to sudo group

sudo su root ( User Password )

change root password

# passwd new_pwd

Add low privileged user ( older version og Kali)

———————————————————-

Add Debian source ftp for getting the updates

vi /etc/apt/sources.list

deb http://ftp.dk.debian.org/debian jessie main

———————————————————-

Update / Upgrade installation

apt-get update
apt-get upgrade (full-upgrade)

How to Enable SSH in Kali Linux 2020
If you wish to enable SSH on Kali Linux, in this article, you will learn how to do so.
In the mid-90s, telnet spawned a secure successor called the secure shell. This is a protocol to communicate with other computers. There are other protocols where you can log in and perform functions as performed by SSH, but it is not safe because it is not encrypted, so people can hijack your sessions and data. However, SSH encrypts the data through a tunnel so that you can securely log in to a remote machine, transmit files, or safely issue remote commands. SSH is applied in the client-server model to transfer and receive the files. There are two terms involved, here: the SSH server and the SSH client. One system acts as a server and the other acts as a client. A public key and a private key is locally stored on the SSH server and client, respectively. The SSH client will make contact with the SSH server and provide the ID of the key pair it wants to use to prove its identity. The challenge is created by the SSH server, which is encrypted by the public key and sent to the client. The client receives the challenge, decrypts it with the private key, and the original challenge is sent back to the SSH server. After the consultation, a secure connection is established. SSH protocol was invented to replace the tunnel so that you could identify the server you are connected to.
We will now take a look at how to enable SSH in Kali Linux.
Install Kali Linux remote SSH-OpenSSH server
Usually, Kali Linux has an OpenSSH server running on it or installed on it. Once you start this server, you can log in via SSH. So, you do not have to install the server, but if you do find yourself in a situation where you do not have it, then you can follow this simple command to install and enable the remote SSH open server in Kali Linux.
$ sudo apt-get install ssh

$ sudo service ssh start

Note: Enabling the SSH server is quite risky, as anyone who knows your password can break into your machine. Securing your password should be your first priority. If you want your service to run for the whole time, then you may follow the next step.
Enable Kali Linux Remote SSH Service
First, you must remove the run levels by entering the following command.
$ sudo update-rc.d -f ssh remove

The next step is to load SSH defaults.
$ sudo update-rc.d -f ssh defaults

After loading, next, you will check whether the service is running.
Update /etc/apt/sources.list with
deb http://ftp.dk.debian.org/debian jessie main

$ sudo chkconfig ssh

If you want to see a lot more, then you can install chkconfig, which can be installed by entering the following command code.
$ sudo apt-get install chkconfig

You can run chkconfig by entering the command given below.
$ sudo chkconfig -l ssh

(or)
$ sudo chkconfig -l
Cchange Kali Default SSH Keys to Avoid MITM Attack
Every Kali Linux system installed has a chance of a MITM (Man In The Middle) attack. MITM attacks are usually observed in a client-server environment. A MITM attack occurs when a hacker gets in between these two components. Hackers can take advantage of unencrypted communication through the MITM attack and can listen in on all of your traffic. To avoid MITM attacks, you can follow the below procedure.
The first step is to move Kali SSH keys to a new folder.
$ sudo cd /etc/ssh/

$ kali@kali: /etc/ssh# mkdir default_kali_keys

$ kali@kali: /etc/ssh# mv ssh_host_* default_kali_keys/

The second step is to regenerate the keys by entering the following command.
$ kali@kali: /etc/ssh# dpkg-reconfigure openssh-server
]

The third step is to verify that the SSH key hashes are different. Enter the following command for verification.
$ kali@kali: /etc/ssh# md5sum ssh_host_*

Now, compare the hashes.
$ kali@kali: /etc/ssh# cd default_kali_keys/

$ kali@kali: /etc/ssh/default_kali_keys# md5sum *

Finally, enter the following command code to restart the SSH.
$ kali@kali: /etc/ssh/default_kali_keys# service ssh restart

Set MOTD with a Nice ASCII
MOTD (Message of the Day) is used to send a common message to all the users. The banner is usually boring, so you can edit the files and add the text of your choice, then save the file.
$ kali@kali:~# vi /etc/motd

$ kali@kali:~# service ssh restart

Troubleshooting
By changing SSH keys in the middle, you may experience a warning sign. Enter the following command to fix this problem.
$ kali@kali:~# vi /root/.ssh/known_hosts

Delete the line that is causing the troubleshoot and restart the SSH.
Change SSH Server Port for Safety
The port number can be changed by entering the following command.
$ kali@kali: /etc/ssh# cp /etc/ssh/sshd_config /etc/ssh/sshd_config_backup

The SSH_config file can be edited further by entering the following command.
$ kali@kali: /etc/ssh# vi /etc/ssh/sshd_config

Now, you can restart the OpenSSH server
$ kali@kali: /etc/ssh# service ssh restart

Use the SSH for the next time you use it.
$ kali@kali:~# ssh username@myhostnaname.com -p 10101

Here, 10101 is the destination port, p stands for port, and the hostname can be IP or FQDN.
Conclusion
The term ‘SSH’ describes a set of rules and guidelines that tells your computer how to send data from one place to the other. The administrators, such as the application owner, administrators responsible for the entire system, or privileged users with higher levels of access mainly use the SSH server. I hope this article helped you with enabling SSH in Kali Linux.

# systemctl -l | grep ssh   / Kør for at se om ssh service er kørende

Hvis den ikke kører, kør kommandon her under

#systemctl enable ssh  /  confugrerer ssh service til at starte automatisk

# service start ssh   / for at starte ssh servicen

———————————————————-

Git Installation

apt-get install git

———————————————————-

Install terminal multiplexer
apt-get install tilix

———————————————————-

Install favorite hacking tools
https//tools.kali.org/kali-metapackages

———————————————————-

Tor installation
Tor Brower Installation:
ud pak fil til samme bib
Flyt upakket bib til desktop
cd /root/Desktop
chown -R root:root tor-browser_en-US
cd tor bib
cd Browser
vi start-tor-browser ( ikke .desktop)
leafpad søg efter root
# foran liner fra if til og med fi
mv tor-bib til /etc

———————————————————-

Config file sharing with synching
search how to securely syncfiles between kali-metapackages

———————————————————-

Clone rubber ducky encoder
search internet git for the git page
git clone https://github.com/mame82/duckencoder.py.git

———————————————————-

Install a code editor
https://atom.io/

Tryk Download
dpkg -i atom.deb

install atom
install dependencies
install atom

———————————————————-

Configure bash aliasses
nano ~/.bash_aliases
alias hackwifi=’besside-ng wlan0′

———————————————————-

Diverse software installationer

Anonsurf installation ( anonym surfing )
git clone https://github.com/Und3rf10w/kali-anonsurf.git

root@kali:~#

root@kali:~# cd kali-anonsurf/

root@kali:~/kali-anonsurf#

root@kali:~/kali-anonsurf# ls

installer.sh kali-anonsurf-deb-src LICENSE README.md

root@kali:~/kali-anonsurf#

./installer.sh

———————————————————-

Putty ( terminal )

apt-get install putty

———————————————————-

Alacarte ( menu editor )

apt install alacarte

———————————————————-

Libreoffice Installation
www.libreoffice.org/download/
tar -zxvf LibreOffice_6.1.0_Linux_x86-64_deb.tar.gz
cd ~/Downloads/LibreOffice_6.1.x_Linux_x86-64_deb/DEBS
dpkg -i *.deb

———————————————————-

Opera Installation
deb http://deb.opera.com/opera-stable/ stable non-free
aptitude update
wget -O – https://deb.opera.com/archive.key | apt-key add –

## re-update (to acknowledge the key)
aptitude update
## then install
aptitude install opera-stable

/usr/share/applications/ vi opera.desktop ( EXEC=opera %U –no-sandbox
cp opera.desktop til /root/.local/share/applications

———————————————————-

Snap software repository

# sudo apt-get update
# sudo apt-get  install snapd
# sudo snap install core

Install Snap Store (GUI)

To install Snap Store, simply use the following command:

# sudo snap install snap-store

# systemctl status snapd.socket
snapd.socket – Socket activation for snappy daemon
Loaded: loaded (/lib/systemd/system/snapd.socket; disabled; vendor preset: disabled)
Active: inactive (dead)
Triggers: snapd.service
Listen: /run/snapd.socket (Stream)
/run/snapd-snap.socket (Stream)

# systemctl enable –now snapd.socket
Created symlink /etc/systemd/system/sockets.target.wants/snapd.socket → /lib/systemd/system/snapd.socket.

# systemctl status snapd.socket
snapd.socket – Socket activation for snappy daemon
Loaded: loaded (/lib/systemd/system/snapd.socket; enabled; vendor preset: disabled)
Active: active (listening) since Mon 2021-02-22 11:50:13 CET; 3s ago
Triggers: snapd.service
Listen: /run/snapd.socket (Stream)
/run/snapd-snap.socket (Stream)
Tasks: 0 (limit: 14050)
Memory: 0B
CPU: 295us
CGroup: /system.slice/snapd.socket

snap list — Viser installerede snap apps

———————————————————-

Temavierwer for remote desktop
https://www.teamviewer.com/en/download/windows/

dpkg -i .deb

———————————————————-

vim editor (enhanched vi editor)
apt-get install vim

———————————————————-

Pdf reader ( xpdf )
apt install xpdf

———————————————————-

Firewall ( ufw )
apt install ufw

———————————————————-

Firewall GUI ( gufw )
apt install gufw

———————————————————-

Server Tools ( samba )
apt install

———————————————————-

Dns Server ( pi-hole )
https://pi-hole.net/

———————————————————-

ClamAV Antivirus
$ sudo apt-get install clamav clamav-daemon

———————————————————-

Youtube downloader
apt-get install youtube-dl

Skriv et svar

Din e-mailadresse vil ikke blive publiceret. Krævede felter er markeret med *