{"id":10191,"date":"2025-10-19T00:42:07","date_gmt":"2025-10-19T00:42:07","guid":{"rendered":"https:\/\/www.hexacorn.com\/blog\/?p=10191"},"modified":"2025-10-19T01:28:03","modified_gmt":"2025-10-19T01:28:03","slug":"1-little-known-secret-of-nslookup-exe-2","status":"publish","type":"post","link":"https:\/\/www.hexacorn.com\/blog\/2025\/10\/19\/1-little-known-secret-of-nslookup-exe-2\/","title":{"rendered":"1 little known secret of nslookup.exe, part 2"},"content":{"rendered":"\n<p>This is a little lolbin trick you can do with a <em>nslookup.exe<\/em> program.<\/p>\n\n\n\n<p>One of the less-known <em>nslookup.exe<\/em> commands is <em>view<\/em> &lt;filename&gt;. When executed, it reads a content of a given file and sorts it. The sorting bit is interesting to us as it is delivered by means of executing a command <em>sort &lt; %s | more. <\/em><\/p>\n\n\n\n<p>So, one can create a dummy file f.ex. <em>foo.txt<\/em>, then a nslookup-driving command file f.ex. <em>bar.txt<\/em> that includes a command to view the content of the <em>foo.txt<\/em> file, and then place a payload inside a <em>sort.exe<\/em> or <em>more.exe<\/em> program present in a local directory, and finally run nslookup with the input delivered from the <em>bar.txt<\/em> file &#8211; resulting in an execution of our payload:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2025\/10\/nslookup_1.png\"><img decoding=\"async\" loading=\"lazy\" width=\"357\" height=\"401\" src=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2025\/10\/nslookup_1.png\" alt=\"\" class=\"wp-image-10192\" srcset=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2025\/10\/nslookup_1.png 357w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2025\/10\/nslookup_1-267x300.png 267w\" sizes=\"(max-width: 357px) 100vw, 357px\" \/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>This is a little lolbin trick you can do with a nslookup.exe program. One of the less-known nslookup.exe commands is view &lt;filename&gt;. When executed, it reads a content of a given file and sorts it. The sorting bit is interesting &hellip; <a href=\"https:\/\/www.hexacorn.com\/blog\/2025\/10\/19\/1-little-known-secret-of-nslookup-exe-2\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[126,56,64],"tags":[],"_links":{"self":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/10191"}],"collection":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/comments?post=10191"}],"version-history":[{"count":2,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/10191\/revisions"}],"predecessor-version":[{"id":10194,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/10191\/revisions\/10194"}],"wp:attachment":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/media?parent=10191"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/categories?post=10191"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/tags?post=10191"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}