{"id":3825,"date":"2025-06-30T10:00:00","date_gmt":"2025-06-30T08:00:00","guid":{"rendered":"https:\/\/hardsoftsecurity.es\/?p=3825"},"modified":"2025-06-28T13:44:59","modified_gmt":"2025-06-28T11:44:59","slug":"offensive-security-on-known-hosts","status":"publish","type":"post","link":"https:\/\/hardsoftsecurity.es\/index.php\/2025\/06\/30\/offensive-security-on-known-hosts\/","title":{"rendered":"\ud83d\udc7d Offensive Forensics on Known Hosts \ud83d\udd0e"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Welcome to a new post where we are going to be talking about the well known file &#8220;known_hosts&#8221; related to the SSH service. However, the post will not be focused on the service itself, the post is going to be focused on Offensive Forensics on Known Hosts to be able to discover which are the hosts that had communication through SSH with the server being audited.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" width=\"720\" height=\"316\" data-attachment-id=\"3841\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2025\/06\/30\/offensive-security-on-known-hosts\/image-109\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2025\/06\/image.png?fit=720%2C316&amp;ssl=1\" data-orig-size=\"720,316\" data-comments-opened=\"1\" data-image-title=\"image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2025\/06\/image.png?fit=720%2C316&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2025\/06\/image.png?resize=720%2C316&#038;ssl=1\" alt=\"Offensive Forensics on Known Hosts\" class=\"wp-image-3841\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2025\/06\/image.png?w=720&amp;ssl=1 720w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2025\/06\/image.png?resize=300%2C132&amp;ssl=1 300w\" sizes=\"(max-width: 720px) 100vw, 720px\" \/><\/figure>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">Let&#8217;s start!<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s start with some background about the file and how OpenSSH works. Mainly OpenSSH clients uses the file &#8220;known_hosts&#8221; to save the SSH fingerprints from previous SSH servers connections. This is very helpful to mitigate and detect man in the middle attacks over SSH.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once, we know the utility of this file, we are going to think on a scenario, where we have access to a Linux server, but we could not get any further host enumerated on the same network. After performing a basic internal enumeration we notice that the server has a big known_hosts file with a lot of fingerprints.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, all the fingerprints are encrypted because of the option &#8220;HashKnownHosts&#8221;. This option most of the time is enabled by default and allows the system to hash all the fingerprints to not trace back the IPs:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"702\" height=\"400\" data-attachment-id=\"3842\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2025\/06\/30\/offensive-security-on-known-hosts\/image-110\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2025\/06\/image-1.png?fit=702%2C400&amp;ssl=1\" data-orig-size=\"702,400\" data-comments-opened=\"1\" data-image-title=\"image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2025\/06\/image-1.png?fit=702%2C400&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2025\/06\/image-1.png?resize=702%2C400&#038;ssl=1\" alt=\"Offensive Forensics on Known Hosts\" class=\"wp-image-3842\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2025\/06\/image-1.png?w=702&amp;ssl=1 702w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2025\/06\/image-1.png?resize=300%2C171&amp;ssl=1 300w\" sizes=\"(max-width: 702px) 100vw, 702px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Time to attack!<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Nevertheless, thanks to our brute force advanced techniques and tools we can try to crack the hashes and discover all the SSH fingerprints and revealing all the IPs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To be able to do brute force, the first thing we will need to do is, download the file or copy the output. Once, we have the fingerprints, we are going to use the following tool to transform the hash to a readable hash for hashcat:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/github.com\/chris408\/known_hosts-hashcat.git\">known_hosts-hashcat by chris408 &#8211; github<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We are going to convert the hashes like:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>python3 kh-converter.py your_known_hosts_file > output.hashes<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then, with hashcat we will be able to run over the hashes and get the IPs:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>the file &#8220;ipv4_hcmask.txt&#8221; is inside the github repository mentioned before. This hashcat brute force is based on mask attacks that are more efficient than the traditional brute force method. The file includes all the mask (patterns) to be able to brute force all the IPv4 addresses (this method will allow us to not generate a file with all the IPv4 addresses):<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>hashcat -m 160 --quiet --hex-salt your_known_hosts_file -a 3 ipv4_hcmask.txt -v<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, after some time we will be able to gather the IPs from the known_hosts file, and start enumerating them:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"800\" height=\"88\" data-attachment-id=\"3844\" data-permalink=\"https:\/\/hardsoftsecurity.es\/index.php\/2025\/06\/30\/offensive-security-on-known-hosts\/image-112\/\" data-orig-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2025\/06\/image-3.png?fit=901%2C99&amp;ssl=1\" data-orig-size=\"901,99\" data-comments-opened=\"1\" data-image-title=\"image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2025\/06\/image-3.png?fit=800%2C88&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2025\/06\/image-3.png?resize=800%2C88&#038;ssl=1\" alt=\"\" class=\"wp-image-3844\" srcset=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2025\/06\/image-3.png?w=901&amp;ssl=1 901w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2025\/06\/image-3.png?resize=300%2C33&amp;ssl=1 300w, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2025\/06\/image-3.png?resize=768%2C84&amp;ssl=1 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I hope you liked the post! That allows us to perform Offensive Forensics on Known Hosts!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Based on: https:\/\/github.com\/chris408\/known_hosts-hashcat<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you are looking for more interesting posts about Offensive Security, remember that always you can check the blog section:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/hardsoftsecurity.es\/index.php\/blog\/\">Blog<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Happy Hacking!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to a new post where we are going to be talking about the well known file &#8220;known_hosts&#8221; related to the SSH service. However, the post will not be focused &#8230;<\/p>\n","protected":false},"author":1,"featured_media":3841,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[3,7],"tags":[556,41,344,153],"class_list":["post-3825","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-guias","category-seguridad-informatica","tag-offensive-security","tag-pentesting","tag-red-team","tag-ssh"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\ud83d\udc7d Offensive Forensics on Known Hosts \ud83d\udd0e - Hardsoft Security<\/title>\n<meta name=\"description\" content=\"Focused on offensive forensics on known hosts to be able to discover SSH communications performed with other SSH servers and gathering IPs.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hardsoftsecurity.es\/index.php\/2025\/06\/30\/offensive-security-on-known-hosts\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\ud83d\udc7d Offensive Forensics on Known Hosts \ud83d\udd0e - Hardsoft Security\" \/>\n<meta property=\"og:description\" content=\"Focused on offensive forensics on known hosts to be able to discover SSH communications performed with other SSH servers and gathering IPs.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hardsoftsecurity.es\/index.php\/2025\/06\/30\/offensive-security-on-known-hosts\/\" \/>\n<meta property=\"og:site_name\" content=\"Hardsoft Security\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/HardSoftDavid\" \/>\n<meta property=\"article:published_time\" content=\"2025-06-30T08:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2025\/06\/image.png?fit=720%2C316&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"720\" \/>\n\t<meta property=\"og:image:height\" content=\"316\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"david\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DavidDeMaya\" \/>\n<meta name=\"twitter:site\" content=\"@DavidDeMaya\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"david\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2025\\\/06\\\/30\\\/offensive-security-on-known-hosts\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2025\\\/06\\\/30\\\/offensive-security-on-known-hosts\\\/\"},\"author\":{\"name\":\"david\",\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/#\\\/schema\\\/person\\\/dfe289b1e4ae2daf72695e85a8b3dd7a\"},\"headline\":\"\ud83d\udc7d Offensive Forensics on Known Hosts \ud83d\udd0e\",\"datePublished\":\"2025-06-30T08:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2025\\\/06\\\/30\\\/offensive-security-on-known-hosts\\\/\"},\"wordCount\":454,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2025\\\/06\\\/30\\\/offensive-security-on-known-hosts\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/hardsoftsecurity.es\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/image.png?fit=720%2C316&ssl=1\",\"keywords\":[\"offensive security\",\"pentesting\",\"Red Team\",\"ssh\"],\"articleSection\":[\"Gu\u00edas\",\"Seguridad inform\u00e1tica\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2025\\\/06\\\/30\\\/offensive-security-on-known-hosts\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2025\\\/06\\\/30\\\/offensive-security-on-known-hosts\\\/\",\"url\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2025\\\/06\\\/30\\\/offensive-security-on-known-hosts\\\/\",\"name\":\"\ud83d\udc7d Offensive Forensics on Known Hosts \ud83d\udd0e - Hardsoft Security\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2025\\\/06\\\/30\\\/offensive-security-on-known-hosts\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2025\\\/06\\\/30\\\/offensive-security-on-known-hosts\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/hardsoftsecurity.es\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/image.png?fit=720%2C316&ssl=1\",\"datePublished\":\"2025-06-30T08:00:00+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/#\\\/schema\\\/person\\\/dfe289b1e4ae2daf72695e85a8b3dd7a\"},\"description\":\"Focused on offensive forensics on known hosts to be able to discover SSH communications performed with other SSH servers and gathering IPs.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2025\\\/06\\\/30\\\/offensive-security-on-known-hosts\\\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2025\\\/06\\\/30\\\/offensive-security-on-known-hosts\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2025\\\/06\\\/30\\\/offensive-security-on-known-hosts\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/hardsoftsecurity.es\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/image.png?fit=720%2C316&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/hardsoftsecurity.es\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/image.png?fit=720%2C316&ssl=1\",\"width\":720,\"height\":316},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/index.php\\\/2025\\\/06\\\/30\\\/offensive-security-on-known-hosts\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\\\/\\\/hardsoftsecurity.es\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\ud83d\udc7d Offensive Forensics on Known Hosts \ud83d\udd0e\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/#website\",\"url\":\"https:\\\/\\\/hardsoftsecurity.es\\\/\",\"name\":\"Hardsoft Security\",\"description\":\"Chasing (In)Security\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/hardsoftsecurity.es\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/hardsoftsecurity.es\\\/#\\\/schema\\\/person\\\/dfe289b1e4ae2daf72695e85a8b3dd7a\",\"name\":\"david\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/868972cb4e72674a12503e080ee081285c7df2fde82787c96a74bca20781cad7?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/868972cb4e72674a12503e080ee081285c7df2fde82787c96a74bca20781cad7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/868972cb4e72674a12503e080ee081285c7df2fde82787c96a74bca20781cad7?s=96&d=mm&r=g\",\"caption\":\"david\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\ud83d\udc7d Offensive Forensics on Known Hosts \ud83d\udd0e - Hardsoft Security","description":"Focused on offensive forensics on known hosts to be able to discover SSH communications performed with other SSH servers and gathering IPs.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/hardsoftsecurity.es\/index.php\/2025\/06\/30\/offensive-security-on-known-hosts\/","og_locale":"es_ES","og_type":"article","og_title":"\ud83d\udc7d Offensive Forensics on Known Hosts \ud83d\udd0e - Hardsoft Security","og_description":"Focused on offensive forensics on known hosts to be able to discover SSH communications performed with other SSH servers and gathering IPs.","og_url":"https:\/\/hardsoftsecurity.es\/index.php\/2025\/06\/30\/offensive-security-on-known-hosts\/","og_site_name":"Hardsoft Security","article_publisher":"https:\/\/www.facebook.com\/HardSoftDavid","article_published_time":"2025-06-30T08:00:00+00:00","og_image":[{"width":720,"height":316,"url":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2025\/06\/image.png?fit=720%2C316&ssl=1","type":"image\/png"}],"author":"david","twitter_card":"summary_large_image","twitter_creator":"@DavidDeMaya","twitter_site":"@DavidDeMaya","twitter_misc":{"Escrito por":"david","Tiempo de lectura":"3 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hardsoftsecurity.es\/index.php\/2025\/06\/30\/offensive-security-on-known-hosts\/#article","isPartOf":{"@id":"https:\/\/hardsoftsecurity.es\/index.php\/2025\/06\/30\/offensive-security-on-known-hosts\/"},"author":{"name":"david","@id":"https:\/\/hardsoftsecurity.es\/#\/schema\/person\/dfe289b1e4ae2daf72695e85a8b3dd7a"},"headline":"\ud83d\udc7d Offensive Forensics on Known Hosts \ud83d\udd0e","datePublished":"2025-06-30T08:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/hardsoftsecurity.es\/index.php\/2025\/06\/30\/offensive-security-on-known-hosts\/"},"wordCount":454,"commentCount":0,"image":{"@id":"https:\/\/hardsoftsecurity.es\/index.php\/2025\/06\/30\/offensive-security-on-known-hosts\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2025\/06\/image.png?fit=720%2C316&ssl=1","keywords":["offensive security","pentesting","Red Team","ssh"],"articleSection":["Gu\u00edas","Seguridad inform\u00e1tica"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/hardsoftsecurity.es\/index.php\/2025\/06\/30\/offensive-security-on-known-hosts\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/hardsoftsecurity.es\/index.php\/2025\/06\/30\/offensive-security-on-known-hosts\/","url":"https:\/\/hardsoftsecurity.es\/index.php\/2025\/06\/30\/offensive-security-on-known-hosts\/","name":"\ud83d\udc7d Offensive Forensics on Known Hosts \ud83d\udd0e - Hardsoft Security","isPartOf":{"@id":"https:\/\/hardsoftsecurity.es\/#website"},"primaryImageOfPage":{"@id":"https:\/\/hardsoftsecurity.es\/index.php\/2025\/06\/30\/offensive-security-on-known-hosts\/#primaryimage"},"image":{"@id":"https:\/\/hardsoftsecurity.es\/index.php\/2025\/06\/30\/offensive-security-on-known-hosts\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2025\/06\/image.png?fit=720%2C316&ssl=1","datePublished":"2025-06-30T08:00:00+00:00","author":{"@id":"https:\/\/hardsoftsecurity.es\/#\/schema\/person\/dfe289b1e4ae2daf72695e85a8b3dd7a"},"description":"Focused on offensive forensics on known hosts to be able to discover SSH communications performed with other SSH servers and gathering IPs.","breadcrumb":{"@id":"https:\/\/hardsoftsecurity.es\/index.php\/2025\/06\/30\/offensive-security-on-known-hosts\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hardsoftsecurity.es\/index.php\/2025\/06\/30\/offensive-security-on-known-hosts\/"]}]},{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/hardsoftsecurity.es\/index.php\/2025\/06\/30\/offensive-security-on-known-hosts\/#primaryimage","url":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2025\/06\/image.png?fit=720%2C316&ssl=1","contentUrl":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2025\/06\/image.png?fit=720%2C316&ssl=1","width":720,"height":316},{"@type":"BreadcrumbList","@id":"https:\/\/hardsoftsecurity.es\/index.php\/2025\/06\/30\/offensive-security-on-known-hosts\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/hardsoftsecurity.es\/"},{"@type":"ListItem","position":2,"name":"\ud83d\udc7d Offensive Forensics on Known Hosts \ud83d\udd0e"}]},{"@type":"WebSite","@id":"https:\/\/hardsoftsecurity.es\/#website","url":"https:\/\/hardsoftsecurity.es\/","name":"Hardsoft Security","description":"Chasing (In)Security","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hardsoftsecurity.es\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Person","@id":"https:\/\/hardsoftsecurity.es\/#\/schema\/person\/dfe289b1e4ae2daf72695e85a8b3dd7a","name":"david","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/secure.gravatar.com\/avatar\/868972cb4e72674a12503e080ee081285c7df2fde82787c96a74bca20781cad7?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/868972cb4e72674a12503e080ee081285c7df2fde82787c96a74bca20781cad7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/868972cb4e72674a12503e080ee081285c7df2fde82787c96a74bca20781cad7?s=96&d=mm&r=g","caption":"david"}}]}},"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7xGFx-ZH","jetpack-related-posts":[{"id":3056,"url":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/02\/try-hack-me-overpass-write-up\/","url_meta":{"origin":3825,"position":0},"title":"Try Hack Me | Overpass | Write Up","author":"david","date":"junio 2, 2023","format":false,"excerpt":"Hey there, Cyber Warriors! \ud83d\ude80 Today we will see another CTF write up but now from Try Hack Me. I did this CTF in one of the workshops in IT-S Now Cyber Security conference in Vienna. Come with me and learn how you can resolv this machine! We will walk\u2026","rel":"","context":"En \u00abGu\u00edas\u00bb","block_context":{"text":"Gu\u00edas","link":"https:\/\/hardsoftsecurity.es\/index.php\/category\/guias\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-2.png?fit=1008%2C720&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-2.png?fit=1008%2C720&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-2.png?fit=1008%2C720&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-2.png?fit=1008%2C720&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":3352,"url":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/09\/13\/tryhackme-internal-write-up\/","url_meta":{"origin":3825,"position":1},"title":"TryHackMe | Internal | Write Up","author":"david","date":"septiembre 13, 2023","format":false,"excerpt":"The realm of cybersecurity is as vast as it is intriguing, and every once in a while, a challenge comes along that truly tests our mettle as ethical hackers. Such was the case with the 'Internal' Capture The Flag (CTF) challenge on TryHackMe. Imagine being handed an environment, just weeks\u2026","rel":"","context":"En \u00abGu\u00edas\u00bb","block_context":{"text":"Gu\u00edas","link":"https:\/\/hardsoftsecurity.es\/index.php\/category\/guias\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/09\/2023-09-11_11-12.png?fit=1200%2C667&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/09\/2023-09-11_11-12.png?fit=1200%2C667&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/09\/2023-09-11_11-12.png?fit=1200%2C667&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/09\/2023-09-11_11-12.png?fit=1200%2C667&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/09\/2023-09-11_11-12.png?fit=1200%2C667&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":105,"url":"https:\/\/hardsoftsecurity.es\/index.php\/2014\/10\/16\/servicio-ssh-en-servidor-ubuntu-12-04-y-windows-2008\/","url_meta":{"origin":3825,"position":2},"title":"Servicio SSH en servidor Ubuntu 12.04 y Windows 2008","author":"david","date":"octubre 16, 2014","format":false,"excerpt":"La gu\u00eda tiene una configuraci\u00f3n esta predeterminada para solucionar lo que exijo, tanto como para Ubuntu como para Windows. Instalaci\u00f3n del servicio Configuraci\u00f3n: Generar claves RSA\/DSA. Posibilitar intercambio de ficheros. Permitir reenvio X11. Instalaci\u00f3n de servicio SSH, Ubuntu server 12 Instalar servicio de SSH en Windows Server 2008 Todo el\u2026","rel":"","context":"En \u00abGu\u00edas\u00bb","block_context":{"text":"Gu\u00edas","link":"https:\/\/hardsoftsecurity.es\/index.php\/category\/guias\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2580,"url":"https:\/\/hardsoftsecurity.es\/index.php\/2021\/11\/11\/anti-fuerza-bruta-ssh-con-mikrotik\/","url_meta":{"origin":3825,"position":3},"title":"Anti fuerza bruta SSH con Mikrotik","author":"david","date":"noviembre 11, 2021","format":false,"excerpt":"Hola a tod@s, hoy os traigo un post tambi\u00e9n relacionado con Mikrotik, en esta ocasi\u00f3n trata de como mediante reglas de nuestro firewall, podemos bloquear intentos de acceso mediante fuerza bruta al servicio SSH. Aplicar estas reglas a nuestro firewall, es bastante sencillo, \u00fanicamente habr\u00eda que aplicar las siguientes reglas\u2026","rel":"","context":"En \u00abGu\u00edas\u00bb","block_context":{"text":"Gu\u00edas","link":"https:\/\/hardsoftsecurity.es\/index.php\/category\/guias\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2021\/11\/brute-force-attack.jpg?fit=1200%2C399&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2021\/11\/brute-force-attack.jpg?fit=1200%2C399&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2021\/11\/brute-force-attack.jpg?fit=1200%2C399&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2021\/11\/brute-force-attack.jpg?fit=1200%2C399&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2021\/11\/brute-force-attack.jpg?fit=1200%2C399&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":1349,"url":"https:\/\/hardsoftsecurity.es\/index.php\/2017\/09\/04\/registrar-la-actividad-sftp\/","url_meta":{"origin":3825,"position":4},"title":"Registrar la actividad SFTP","author":"david","date":"septiembre 4, 2017","format":false,"excerpt":"Hola a todos, hoy os traigo un art\u00edculo donde indico como registrar toda la actividad que pasa dentro de nuestro servicio SFTP. Tras una breve introducci\u00f3n vamos a proceder a la explicaci\u00f3n, para poder realizar esto, nos dirigimos al fichero de configuraci\u00f3n del servicio ssh, \"\/etc\/ssh\/sshd_conf\". Despu\u00e9s de entrar al\u2026","rel":"","context":"En \u00abHardening linux\u00bb","block_context":{"text":"Hardening linux","link":"https:\/\/hardsoftsecurity.es\/index.php\/category\/hardening-linux\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2017\/09\/PYtICj.jpg?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2017\/09\/PYtICj.jpg?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2017\/09\/PYtICj.jpg?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2017\/09\/PYtICj.jpg?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2017\/09\/PYtICj.jpg?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3092,"url":"https:\/\/hardsoftsecurity.es\/index.php\/2023\/06\/14\/hack-the-box-inject-write-up\/","url_meta":{"origin":3825,"position":5},"title":"Hack The Box | Inject | Write Up","author":"david","date":"junio 14, 2023","format":false,"excerpt":"Just tackled the 'Inject' machine on #HackTheBox. Loved the exploration of high ports and the challenge of the injection exploitation! If you're into #CTF, this is a must try! \ud83d\ude80 #CyberSecurity #PenTesting #EthicalHacking #InfoSec The first step we will do is perform our Nmap scan: \u2514\u2500$ sudo nmap -sT -n\u2026","rel":"","context":"En \u00abGu\u00edas\u00bb","block_context":{"text":"Gu\u00edas","link":"https:\/\/hardsoftsecurity.es\/index.php\/category\/guias\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-15.png?fit=1200%2C1028&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-15.png?fit=1200%2C1028&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-15.png?fit=1200%2C1028&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-15.png?fit=1200%2C1028&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2023\/06\/image-15.png?fit=1200%2C1028&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"jetpack_likes_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/hardsoftsecurity.es\/wp-content\/uploads\/2025\/06\/image.png?fit=720%2C316&ssl=1","_links":{"self":[{"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/posts\/3825","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/comments?post=3825"}],"version-history":[{"count":2,"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/posts\/3825\/revisions"}],"predecessor-version":[{"id":3845,"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/posts\/3825\/revisions\/3845"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/media\/3841"}],"wp:attachment":[{"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/media?parent=3825"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/categories?post=3825"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hardsoftsecurity.es\/index.php\/wp-json\/wp\/v2\/tags?post=3825"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}