Normale Ansicht

Lösung: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead

19. Januar 2023 um 17:24

Was ist apt-key?

Die Man Pages beschreiben apt-key wie folgt:

apt-key is used to manage the list of keys used by apt to authenticate packages. Packages which have been authenticated using these keys will be considered trusted.

apt-key wird verwendet, um die Liste der Schlüssel zu verwalten, die von apt zur Authentifizierung von Paketen verwendet werden. Pakete, die mit diesen Schlüsseln authentifiziert wurden, werden als vertrauenswürdig eingestuft.

Der Vollständigkeit halber hier der Punkt zur "deprecated" Meldung:

update (deprecated)
Update the local keyring with the archive keyring and remove from the local keyring the archive keys which are no longer valid. The archive keyring is shipped in the archive-keyring package of your distribution, e.g. the ubuntu-keyring package in Ubuntu.

Note that a distribution does not need to and in fact should not use this command any longer and instead ship keyring files in the /etc/apt/trusted.gpg.d/ directory directly as this avoids a dependency on gnupg and it is easier to manage keys by simply adding and removing files for maintainers and users alike.

Was bedeutet apt-key is deprecated?

In der Fehlermeldung "apt-key is deprecated. Manage keyring files in trusted.gpg.d" sind zwei Meldungen versteckt:

Bisher wurden Schlüssel in trusted.gpg verwaltet. In Zukunft sollten die Schlüssel einzeln unter trusted.gpg.d verwaltet werden. Der Grund für das Abschaffen des alten Vorgangs ist die schlicht die Sicherheit.

Zusätzlich wird apt-key als veraltet eingestuft. Da es sich hier nur um eine Warnung handelt, kann diese bis jetzt auch einfach ignoriert werden. Im Prinzip möchte sie den Nutzer weg von apt-key hin zu gpg schubsen und genau das möchte ich hier zeigen.

Bei einem apt update wirft ein Ubuntu beispielsweise folgenden Warnungen in Bezug auf nodejs und yarn Repositorys

reading package lists... Done
W: https://deb.nodesource.com/node_16.x/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: https://dl.yarnpkg.com/debian/dists/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

Lösung -  Schlüssel aus trusted.gpg in trusted.gpg.d umziehen

Die Lösung für die oben aufgeführte Problematik ist das bereits erwähnte Umschichten von trusted.gpg zu trusted.gpg.d.

Zunächst werden die betreffenden Schlüssel aufgelistet:

sudo apt-key list
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
/etc/apt/trusted.gpg
--------------------
pub   rsa4096 2014-06-13 [SC]
      9FD3 B784 BC1C 6FC3 1A8A  0A1C 1655 A0AB 6857 6280
uid           [ unknown] NodeSource <gpg@nodesource.com>
sub   rsa4096 2014-06-13 [E]

pub   rsa4096 2016-10-05 [SC]
      72EC F46A 56B4 AD39 C907  BBB7 1646 B01B 86E5 0310
uid           [ unknown] Yarn Packaging <yarn@dan.cx>
sub   rsa4096 2016-10-05 [E]
sub   rsa4096 2019-01-02 [S] [expires: 2023-01-24]
sub   rsa4096 2019-01-11 [S] [expires: 2023-01-24]


Schlüssel in eine eigene Datei verschieben

Danach die letzten 8 Zeichen der zweiten Zeile unter pub kopieren. In diesem Fall ist das 6857 6280. Das Leerzeichen zwischen den Zahlen muss entfernt werden.
Der zukünftige Name kann beliebig gewählt werden, es liegt allerdings nahe, ihn nach dem installierten Paket bzw. Repository zu benennen:

sudo apt-key export 68576280 | sudo gpg --dearmour -o /etc/apt/trusted.gpg.d/nodejs-key.gpg
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).

sudo apt-key export 86E50310 | sudo gpg --dearmour -o /etc/apt/trusted.gpg.d/yarn-key.gpg
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).

sudo apt-get update

Nun sollten die Warnungen der Vergangenheit angehören.

Neue Schlüssel hinzufügen

Sollte ein neuer Schlüssel hinzugefügt werden, wird in Zukunft nicht mehr mit apt-key gearbeitet, sondern gpg verwendet werden.

Früher

curl -sS https://download.spotify.com/debian/pubkey_5E3C45D7B312C643.gpg | sudo apt-key add -


Heute

curl -sS https://download.spotify.com/debian/pubkey_7A3A762FAFD4A51F.gpg | sudo gpg --dearmor --yes -o /etc/apt/trusted.gpg.d/spotify.gpg

 

OSINT - Analyse Tools fürs Netzwerk

26. Dezember 2022 um 11:31

Der Begriff OSINT (Open Source Intelligence) ist nicht erst seit 2022 ein allgemein bekannter Begriff, hat allerdings durch den Krieg in der Ukraine, Krisen und dem Durst nach Informationsgewinnung, viel Aufschwung erfahren. Das erste Mal wurde die Öffentlichkeit durch Bellingcat im Jahr 2012 darauf aufmerksam.

Der Begriff steht für die Informationsgewinnung aus öffentlichen Daten. Dabei helfen Tools, diese Daten zu analysieren, zu interpretieren und zu sortieren. Gerade im Netzwerkbereich finden sich hier spannende Programme.

Ich selbst nutze für persönliche Zwecke diverse öffentliche bzw. freie Tools, sei es zur Netzwerkanalyse, für verdächtige E-Mailheader oder zum DNS Check. Möglichkeiten gibt es sehr viele.

Dabei ist eine kleine Liste zusammen gekommen, welche ich euch gerne zur Verfügung stellen möchte.

Eine dauerhaft aktualisierte Liste findet ihr in Zukunft unter osint.itrig.de.

Browser User Agent & Bot Analyse (online)
  • https://whatmyuseragent.com
  • https://robotsdb.de/robots-verzeichnis
  • https://www.cimtools.net/en/extra/bots_list.php
Domain Certificates SSL Check (lokal)
  • https://github.com/drwetter/testssl.sh
Domain Certificates SSL Check (online)
  • https://ciphersuite.info
  • https://crt.sh
  • https://www.ssllabs.com/ssltest
  • https://observatory.mozilla.org
  • https://ciphersuite.info
Domain DNS Tools (lokal)
  • https://github.com/darkoperator/dnsrecon
Domain DNS Tools (online)
  • https://dnsdumpster.com
  • https://www.whatsmydns.net
  • https://toolbox.googleapps.com/apps/dig
  • https://viewdns.info
Domain URL Tools (online)
  • https://osint.sh
  • https://urlscan.io
  • https://www.brightcloud.com/tools/url-ip-lookup.php
  • https://unshorten.me
  • https://securitytrails.com
  • https://www.maxmind.com/en/locate-my-ip-address
Firmen Analyse (online)
  • https://www.bundesanzeiger.de
  • https://www.insolvenzbekanntmachungen.de
  • https://www.northdata.de
Git Search Tools (online)
  • https://grep.app
IP Search & Scan Tools (lokal)
  • https://github.com/robertdavidgraham/masscan
IP Search & Scan Tools (online)
  • https://www.shodan.io/explore
  • https://search.censys.io
  • https://fullhunt.io

Mail Analyse Tools (lokal)

  • https://github.com/ninoseki/eml_analyzer
  • https://github.com/cyberdefenders/email-header-analyzer
  • https://thatsthem.com/reverse-email-lookup
 
Mail Analyse Tools (online)
  • https://hunter.io
  • https://emailrep.io
  • https://eml-analyzer.herokuapp.com
  • https://www.spf-record.de
  • https://toolbox.googleapps.com/apps/messageheader
Malware & File Analyse (lokal)
  • https://github.com/mandiant/capa
  • https://github.com/horsicq/Detect-It-Easy
Malware & File Analyse (online)
  • https://labs.inquest.net
  • https://www.virustotal.com/gui/home/search
  • https://www.filescan.io/scan
Messenger Analyse (online)
  • https://telemetr.io (telegram)
Multitools (lokal)
  • https://github.com/pyhackertarget/hackertarget
  • https://github.com/laramies/theHarvester
Multitools Browser Add-ons
  • https://github.com/ninoseki/mitaka
  • https://addons.mozilla.org/de/firefox/addon/hacktools
Network BGP / ASN Tools (online)
  • https://bgp.he.net
  • https://www.peeringdb.com
  • https://bgp.tools
  • https://bgpstream.crosswork.cisco.com
Sammlungen - Collections
  • https://github.com/jivoi/awesome-osint
  • https://github.com/cipher387/osint_stuff_tool_collection
  • https://osintframework.com

Schwachstellen - CVE (online)

  • https://www.cvedetails.com
  • https://www.cve.org
  • https://www.opencve.io
Sonstiges
  • https://iknowwhereyourcatlives.com (Katzen)
  • https://intelx.io (Darkweb)
  • https://github.com/secdev/scapy (Traffic Tests)
  • https://locust.io (Traffic Tests)

Website Traffic

  • https://www.similarweb.com/de
Webtech Analyse (online)
  • https://www.wappalyzer.com
  • https://osint.sh/stack
  • https://website.informer.com
  • https://builtwith.com
  • https://www.whatruns.com
❌