Upgrade to Pro — share decks privately, control downloads, hide ads and more …

take care of your logs (de)

take care of your logs (de)

Der Vortrag auf der OSMC 2016 zum Thema warum man ein zentrales Logging haben will, was man gewinnt und wie man auch das Management überzeugen kann das es eine sinnvolle Investition ist Hardware dafür bereit zu stellen.

Video: https://youtu.be/JDLfHnpErvo

Jan Doberstein

December 01, 2016
Tweet

More Decks by Jan Doberstein

Other Decks in Technology

Transcript

  1. – Wikipedia „Eine Logdatei enthält das automatisch geführte Protokoll aller

    oder bestimmter Aktionen von Prozessen auf einem Computersystem.“
  2. – Wikipedia „ Außer dem Betriebssystem selbst schreiben meist Hintergrundprogramme

    (z. B. ein E-Mail- Server, ein Proxyserver und anderes) in Logdateien, um Aktionsmeldungen, Fehlermeldungen und Hinweise persistent (dauernd) oder temporär verfügbar zu halten. Ähnliches gilt für Installationsprogramme, Firewalls, Virenscanner und dergleichen. “
  3. Aug 16 18:18:19 d8.jalogis.ch sshd[26944]: fatal: Unable to negotiate a

    key exchange method [preauth] Aug 16 18:18:39 d8.jalogis.ch sshd[26946]: reverse mapping checking getaddrinfo for hn.kd.ny.adsl [222.138.139.252] failed - POSSIBLE BREAK-IN ATTEMPT! Aug 16 18:18:39 d8.jalogis.ch sshd[26946]: Invalid user admin from 222.138.139.252 Aug 16 18:18:39 d8.jalogis.ch sshd[26946]: input_userauth_request: invalid user admin [preauth] Aug 16 18:18:39 d8.jalogis.ch sshd[26946]: Connection closed by 222.138.139.252 [preauth] Aug 16 18:19:16 d8.jalogis.ch sshd[26948]: fatal: Unable to negotiate a key exchange method [preauth]
  4. lokales Sammeln root@d8:/var/log# grep -v "fatal: Unable to negotiate a

    key exchange method" auth.log | grep -v „pam_unix(cron:session)“ Aug 16 18:12:18 d8.jalogis.ch sshd[26930]: Connection closed by 45.114.50.54 [preauth] Aug 16 18:18:39 d8.jalogis.ch sshd[26946]: reverse mapping checking getaddrinfo for hn.kd.ny.adsl [222.138.139.252] failed - POSSIBLE BREAK- IN ATTEMPT! Aug 16 18:18:39 d8.jalogis.ch sshd[26946]: Invalid user admin from 222.138.139.252 Aug 16 18:18:39 d8.jalogis.ch sshd[26946]: input_userauth_request: invalid user admin [preauth] Aug 16 18:18:39 d8.jalogis.ch sshd[26946]: Connection closed by 222.138.139.252 [preauth]
  5. lokales Sammeln root@d8:~# grep -v 'pam_uni(cron:session)' /var/ log/auth.log | grep

    'fatal: Unable to negotiate a key exchange method' | wc -l 3082
  6. lokales Sammeln • Ist der Host nicht erreichbar, gibt es

    kein Log • Lokale Logs erlauben es nicht, globale Ereignisse zu verfolg en • Kompromittierte Systeme sind manipuliert
  7. Aug 16 18:18:19 d8.jalogis.ch sshd[26944]: fatal: Unable to negotiate a

    key exchange method [preauth] Aug 16 18:18:39 d8.jalogis.ch sshd[26946]: reverse mapping checking getaddrinfo for hn.kd.ny.adsl [222.138.139.252] failed - POSSIBLE BREAK-IN ATTEMPT! Aug 16 18:18:39 d8.jalogis.ch sshd[26946]: Invalid user admin from 222.138.139.252 Aug 16 18:18:39 d8.jalogis.ch sshd[26946]: input_userauth_request: invalid user admin [preauth] Aug 16 18:18:39 d8.jalogis.ch sshd[26946]: Connection closed by 222.138.139.252 [preauth] Aug 16 18:19:16 d8.jalogis.ch sshd[26948]: fatal: Unable to negotiate a key exchange method [preauth]
  8. (?<timestamp>\b(?:[Jj]an(?:uary|uar)?|[Ff]eb(?:ruary|ruar)?|[Mm](?:a|ä)?r(?:ch|z)?| [Aa]pr(?:il)?|[Mm]a(?:y|i)?|[Jj]un(?:e|i)?|[Jj]ul(?:y)?|[Aa]ug(?:ust)?|[Ss]ep(?:tember)?|[Oo](?:c| k)?t(?:ober)?|[Nn]ov(?:ember)?|[Dd]e(?:c|z)(?:ember)?)\b +(?:(?:0[1-9])|(?:[12][0-9])|(?:3[01])| [1-9]) (?!<[0-9])(?:2[0123]|[01]?[0-9]):(?:[0-5][0-9])(?::(?:(?:[0-5]?[0-9]|60)(?:[:.,][0-9]+)?))(?![0-9])) (?:<(?<facility>\b(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-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?|(?<![0-9])(?:(?:[0-1]? [0-9]{1,2}|2[0-4][0-9]|25[0-5])[.](?:[0-1]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])[.](?:[0-1]?[0-9]{1,2}|2[0-4] [0-9]|25[0-5])[.](?:[0-1]?[0-9]{1,2}|2[0-4][0-9]|25[0-5]))(?![0-9]))|\b(?:[0-9A-Za-z][0-9A-Za-z-] {0,62})(?:\.(?:[0-9A-Za-z][0-9A-Za-z-]{0,62}))*(\.?|\b))) (?<program>[\x21-\x5a\x5c\x5e-\x7e] +)(?:\[(?<pid>\b(?:[1-9][0-9]*)\b)\])?: (?<message>.*)
  9. Aug 16 18:18:19 d8.jalogis.ch sshd[26944]: fatal: Unable to negotiate a

    key exchange method [preauth] Aug 16 18:18:39 d8.jalogis.ch sshd[26946]: reverse mapping checking getaddrinfo for hn.kd.ny.adsl [222.138.139.252] failed - POSSIBLE BREAK-IN ATTEMPT! Aug 16 18:18:39 d8.jalogis.ch sshd[26946]: Invalid user admin from 222.138.139.252 Aug 16 18:18:39 d8.jalogis.ch sshd[26946]: input_userauth_request: invalid user admin [preauth] Aug 16 18:18:39 d8.jalogis.ch sshd[26946]: Connection closed by 222.138.139.252 [preauth] Aug 16 18:19:16 d8.jalogis.ch sshd[26948]: fatal: Unable to negotiate a key exchange method [preauth]
  10. Einheitliche Betrachtung • verminderte Zugriffsrechte auf Server • schneller und

    einfacher Zugriff auf Informationen • einfache Administration
  11. Font: Roboto | Image Credits: 1-2: Leo Gonzales https://www.flickr.com/photos/leoglenn_g/ 3:

    Micolo J https://www.flickr.com/photos/robin1966/ 4,5: Christoper https://www.flickr.com/photos/exalthim/ 6-11: MrTinDC https://www.flickr.com/photos/mr_t_in_dc/ 13: Mike Baker https://www.flickr.com/photos/36593372@N04/ 12-17: Jon Anderson https://www.flickr.com/photos/adstream/ 18-24: J Drew https://www.flickr.com/photos/brewbooks/ 25-35, 45: Steven Isaacson https://www.flickr.com/photos/spi/ 36-40: Dennis Jarvis https://www.flickr.com/photos/archer10/ 41: Wiscon Department https://www.flickr.com/photos/widnr/ 42: Budi Nusyirwan https://www.flickr.com/photos/bukrie/ 43,44: Dana https://www.flickr.com/photos/roseannadana/ 46,47: Jan Doberstein