Showing posts with label apt-get. Show all posts
Showing posts with label apt-get. Show all posts

Monday, November 25, 2019

kali update apt-get upgrade

apt-get update (gets the sources lists for packages)
apt-get upgrade (upgrade tools)
apt-get dist-upgrade (entire kali rolling)
apt-get autoremove (removes dependencies no longer needed)

Friday, February 1, 2019

Kali apt-get fail (404 not found), apt-get update fail (not valid yet), Fix=old date


In Kali I was trying to install packages but kept getting this error

root@kali:~# apt-get install libssh-dev
Reading package lists... Done
Building dependency tree     
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libgnutls-dane0 libunbound2
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  libssh-4 zlib1g-dev
Suggested packages:
  libssh-doc
The following NEW packages will be installed:
  libssh-dev zlib1g-dev
The following packages will be upgraded:
  libssh-4
1 upgraded, 2 newly installed, 0 to remove and 1472 not upgraded.
Need to get 435 kB/649 kB of archives.
After this operation, 1,651 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Err:1 http://http.kali.org/kali kali-rolling/main amd64 libssh-4 amd64 0.8.5-1
  404  Not Found [IP: 192.99.200.113 80]
Err:2 http://http.kali.org/kali kali-rolling/main amd64 libssh-dev amd64 0.8.5-1
  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/libs/libssh/libssh-4_0.8.5-1_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/libs/libssh/libssh-dev_0.8.5-1_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

When I tried the update I got this error

root@kali:~# apt-get update
Get:1 http://kali.download/kali kali-rolling InRelease [30.5 kB]
Reading package lists... Done     
E: Release file for http://http.kali.org/kali/dists/kali-rolling/InRelease is not valid yet (invalid for another 41d 16h 53min 30s). Updates for this repository will not be applied.

When I ran date I realized is was many days behind

root@kali:~# date

The fix was to install ntpdate and run it

root@kali:~# apt-get install ntpdate
root@kali:~# ntpdate in.pool.ntp.org

Now my date was correct

root@kali:~# date

And now my installs worked

root@kali:~# apt-get install libssh-dev

Saturday, December 22, 2018

apt-get update fails on Kali KEYEXPIRED

if

apt-get update

fails on Kali 

with an error like this

Get:1 http://kali.download/kali kali-rolling InRelease [30.5 kB]
Err:1 http://kali.download/kali kali-rolling InRelease
  The following signatures were invalid: KEYEXPIRED 1517583136  KEYEXPIRED 1517583136  KEYEXPIRED 1517583136  KEYEXPIRED 1517583136  KEYEXPIRED 1517583136
Fetched 30.5 kB in 8s (3,483 B/s)
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://kali.download/kali kali-rolling InRelease: The following signatures were invalid: KEYEXPIRED 1517583136  KEYEXPIRED 1517583136  KEYEXPIRED 1517583136  KEYEXPIRED 1517583136  KEYEXPIRED 1517583136
W: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/InRelease  The following signatures were invalid: KEYEXPIRED 1517583136  KEYEXPIRED 1517583136  KEYEXPIRED 1517583136  KEYEXPIRED 1517583136  KEYEXPIRED 1517583136
W: Some index files failed to download. They have been ignored, or old ones used instead.


The fix appears to be these 2 commands that get new keys


wget https://http.kali.org/kali/pool/main/k/kali-archive-keyring/kali-archive-keyring_2018.1_all.deb
apt install ./kali-archive-keyring_2018.1_all.deb

Tuesday, August 2, 2016

Article on Securing a Linux Server

Thought this was a fun little blog by Cody Littlewood about Securing a Linux Server. He runs through the things he does in the first 10 minutes and I though they were worth listing out. Quite a bit of good discussion in the comments after it as well.

1.) Setup a strong root password
2.) Update your apt repositories
3.) Upgrade your patches via atp
4.) Add your user (so you don't ever use root again)
5.) Setup SSH key authentication (so eventually below we can eliminate passwords)
6.) Setup sudo for your user
7.) Enforce SSH key authentication (don't allow root login, eliminate password auth, ip filter)
8.) Setup your local firewall (don't forget your ip filter you added for ssh)
9.) Enable automatic security updates
10.) Enable fail2ban to block suspicious activity real-time
11.) Enable 2-factor authentication (like google authenticator)
12.) Enable a tool like LogWatch to ensure you are monitoring your logs


It's a good start to your Server Build/Hardening guide you should have.

More about neonprimetime


Top Blogs of all-time
  1. pagerank botnet sql injection walk-thru
  2. DOM XSS 101 Walk-Through
  3. An Invoice email and a Hot mess of Java


Top Github Contributions
  1. Qualys Scantronitor 2.0


Copyright © 2016, this post cannot be reproduced or retransmitted in any form without reference to the original post.