{"id":7370,"date":"2017-10-09T08:42:35","date_gmt":"2017-10-09T06:42:35","guid":{"rendered":"https:\/\/hansesecure.de\/2017\/10\/slae-assignment-2-tcp-reverse_shell\/"},"modified":"2017-10-09T08:42:35","modified_gmt":"2017-10-09T06:42:35","slug":"slae-assignment-2-tcp-reverse_shell","status":"publish","type":"post","link":"https:\/\/hansesecure.de\/en\/2017\/10\/slae-assignment-2-tcp-reverse_shell\/","title":{"rendered":"SLAE Assignment #2 | TCP Reverse_Shell"},"content":{"rendered":"<p>Welcome back to my second post for the SLAE certification.<\/p>\n<p>Today we are going to build a reverse_shell shellcode and again you can find the files <a href=\"https:\/\/github.com\/HanseSecure\/SLAE\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n<p>This task is very similar to the first one, so i dont have to look up new\/more information. Lets switch some syscalls and registers!<br \/>\nThe code for <em>socket_setup<\/em>, <em>fileDescriptors<\/em> and <em>shellExecution<\/em> are the same as in our <a href=\"https:\/\/hansesecure.de\/en\/2017\/10\/slae-assignment-1-tcp-bind_shell\/\" target=\"_blank\" rel=\"noopener\">bind_shell assignment<\/a>.<\/p>\n<p>After the <em>socket_setup<\/em> we connect to a specific port and ip, which are also marked in the code with comments:<\/p>\n<p><a href=\"https:\/\/hansesecure.de\/wp-banane\/uploads\/2017\/10\/slae_2_reverseConnect.jpg\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-650\" src=\"https:\/\/hansesecure.de\/wp-banane\/uploads\/2017\/10\/slae_2_reverseConnect-300x106.jpg\" alt=\"\" width=\"400\" height=\"142\"><\/a><\/p>\n<p>So lets try our new shellcode:<br \/>\n#1 nc -lv 11013<br \/>\n#2 .\/reverse_shell<br \/>\n#3 Boom!<\/p>\n<p><a href=\"https:\/\/hansesecure.de\/wp-banane\/uploads\/2017\/10\/slae_2_reverseBoom.jpg\"><img decoding=\"async\" class=\"aligncenter wp-image-651\" src=\"https:\/\/hansesecure.de\/wp-banane\/uploads\/2017\/10\/slae_2_reverseBoom-300x68.jpg\" alt=\"\" width=\"400\" height=\"91\"><\/a><br \/>\nNow we are able to own systems behind NAT with our selfwritten shellcode, nice!<\/p>\n<p>&nbsp;<\/p>\n<p>This blog post has been created for completing the requirements of the SecurityTube Linux Assembly Expert certification:<br \/>\n<a href=\"http:\/\/securitytube-training.com\/online-courses\/securitytube-linux-assembly-expert\/\" target=\"_blank\" rel=\"nofollow noopener\">http:\/\/securitytube-training.com\/online-courses\/securitytube-linux-assembly-expert\/<\/a><\/p>\n<p>Student ID: SLAE-1036<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome back to my second post for the SLAE certification. Today we are going to build a reverse_shell shellcode and again you can find the files here. This task is very similar to the first one, so i dont have to look up new\/more information. Lets switch some syscalls and registers! The code for socket_setup, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[257],"tags":[269,270,266,271],"class_list":["post-7370","post","type-post","status-publish","format-standard","hentry","category-deep-dive-techniques","tag-assembler-en","tag-linux-en-2","tag-migration-en","tag-slae-en-2"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>SLAE Assignment #2 | TCP Reverse_Shell &#8211; HanseSecure GmbH<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hansesecure.de\/en\/2017\/10\/slae-assignment-2-tcp-reverse_shell\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SLAE Assignment #2 | TCP Reverse_Shell &#8211; HanseSecure GmbH\" \/>\n<meta property=\"og:description\" content=\"Welcome back to my second post for the SLAE certification. Today we are going to build a reverse_shell shellcode and again you can find the files here. This task is very similar to the first one, so i dont have to look up new\/more information. Lets switch some syscalls and registers! The code for socket_setup, [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hansesecure.de\/en\/2017\/10\/slae-assignment-2-tcp-reverse_shell\/\" \/>\n<meta property=\"og:site_name\" content=\"HanseSecure GmbH\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/hansesecure\" \/>\n<meta property=\"article:published_time\" content=\"2017-10-09T06:42:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/hansesecure.de\/wp-banane\/uploads\/2017\/10\/slae_2_reverseConnect-300x106.jpg\" \/>\n<meta name=\"author\" content=\"HanseSecure\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CyberWarship\" \/>\n<meta name=\"twitter:site\" content=\"@CyberWarship\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"HanseSecure\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/hansesecure.de\\\/en\\\/2017\\\/10\\\/slae-assignment-2-tcp-reverse_shell\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hansesecure.de\\\/en\\\/2017\\\/10\\\/slae-assignment-2-tcp-reverse_shell\\\/\"},\"author\":{\"name\":\"HanseSecure\",\"@id\":\"https:\\\/\\\/hansesecure.de\\\/en\\\/#\\\/schema\\\/person\\\/6ec6ef4887ff2fc97a14f1a7f390f593\"},\"headline\":\"SLAE Assignment #2 | TCP Reverse_Shell\",\"datePublished\":\"2017-10-09T06:42:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/hansesecure.de\\\/en\\\/2017\\\/10\\\/slae-assignment-2-tcp-reverse_shell\\\/\"},\"wordCount\":147,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/hansesecure.de\\\/en\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/hansesecure.de\\\/en\\\/2017\\\/10\\\/slae-assignment-2-tcp-reverse_shell\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/hansesecure.de\\\/wp-banane\\\/uploads\\\/2017\\\/10\\\/slae_2_reverseConnect-300x106.jpg\",\"keywords\":[\"Assembler\",\"Linux\",\"Migration\",\"SLAE\"],\"articleSection\":[\"Deep Dive Techniques\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/hansesecure.de\\\/en\\\/2017\\\/10\\\/slae-assignment-2-tcp-reverse_shell\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/hansesecure.de\\\/en\\\/2017\\\/10\\\/slae-assignment-2-tcp-reverse_shell\\\/\",\"url\":\"https:\\\/\\\/hansesecure.de\\\/en\\\/2017\\\/10\\\/slae-assignment-2-tcp-reverse_shell\\\/\",\"name\":\"SLAE Assignment #2 | TCP Reverse_Shell &#8211; HanseSecure GmbH\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hansesecure.de\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/hansesecure.de\\\/en\\\/2017\\\/10\\\/slae-assignment-2-tcp-reverse_shell\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/hansesecure.de\\\/en\\\/2017\\\/10\\\/slae-assignment-2-tcp-reverse_shell\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/hansesecure.de\\\/wp-banane\\\/uploads\\\/2017\\\/10\\\/slae_2_reverseConnect-300x106.jpg\",\"datePublished\":\"2017-10-09T06:42:35+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/hansesecure.de\\\/en\\\/2017\\\/10\\\/slae-assignment-2-tcp-reverse_shell\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/hansesecure.de\\\/en\\\/2017\\\/10\\\/slae-assignment-2-tcp-reverse_shell\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/hansesecure.de\\\/en\\\/2017\\\/10\\\/slae-assignment-2-tcp-reverse_shell\\\/#primaryimage\",\"url\":\"https:\\\/\\\/hansesecure.de\\\/wp-banane\\\/uploads\\\/2017\\\/10\\\/slae_2_reverseConnect-300x106.jpg\",\"contentUrl\":\"https:\\\/\\\/hansesecure.de\\\/wp-banane\\\/uploads\\\/2017\\\/10\\\/slae_2_reverseConnect-300x106.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/hansesecure.de\\\/en\\\/2017\\\/10\\\/slae-assignment-2-tcp-reverse_shell\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Startseite\",\"item\":\"https:\\\/\\\/hansesecure.de\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SLAE Assignment #2 | TCP Reverse_Shell\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/hansesecure.de\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/hansesecure.de\\\/en\\\/\",\"name\":\"HanseSecure GmbH\",\"description\":\"Choose the Intruder\",\"publisher\":{\"@id\":\"https:\\\/\\\/hansesecure.de\\\/en\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/hansesecure.de\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/hansesecure.de\\\/en\\\/#organization\",\"name\":\"HanseSecure GmbH\",\"url\":\"https:\\\/\\\/hansesecure.de\\\/en\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/hansesecure.de\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/hansesecure.de\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/cropped-000-LOGO-intensiv-schwarz-rot-HanseSecure_LOGO_CTI_Vektor_rotes_H11806.png\",\"contentUrl\":\"https:\\\/\\\/hansesecure.de\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/cropped-000-LOGO-intensiv-schwarz-rot-HanseSecure_LOGO_CTI_Vektor_rotes_H11806.png\",\"width\":512,\"height\":512,\"caption\":\"HanseSecure GmbH\"},\"image\":{\"@id\":\"https:\\\/\\\/hansesecure.de\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/facebook.com\\\/hansesecure\",\"https:\\\/\\\/x.com\\\/CyberWarship\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/hansesecure\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCAABbKOA_stDFkEKS3MSF7Q\",\"https:\\\/\\\/www.instagram.com\\\/hansesecure\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/hansesecure.de\\\/en\\\/#\\\/schema\\\/person\\\/6ec6ef4887ff2fc97a14f1a7f390f593\",\"name\":\"HanseSecure\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/58fe26b2270315f2ab1268b229465b72c497c86aac3696aaaf2e629ae4e4f0af?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/58fe26b2270315f2ab1268b229465b72c497c86aac3696aaaf2e629ae4e4f0af?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/58fe26b2270315f2ab1268b229465b72c497c86aac3696aaaf2e629ae4e4f0af?s=96&d=mm&r=g\",\"caption\":\"HanseSecure\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SLAE Assignment #2 | TCP Reverse_Shell &#8211; HanseSecure GmbH","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:\/\/hansesecure.de\/en\/2017\/10\/slae-assignment-2-tcp-reverse_shell\/","og_locale":"en_US","og_type":"article","og_title":"SLAE Assignment #2 | TCP Reverse_Shell &#8211; HanseSecure GmbH","og_description":"Welcome back to my second post for the SLAE certification. Today we are going to build a reverse_shell shellcode and again you can find the files here. This task is very similar to the first one, so i dont have to look up new\/more information. Lets switch some syscalls and registers! The code for socket_setup, [&hellip;]","og_url":"https:\/\/hansesecure.de\/en\/2017\/10\/slae-assignment-2-tcp-reverse_shell\/","og_site_name":"HanseSecure GmbH","article_publisher":"https:\/\/facebook.com\/hansesecure","article_published_time":"2017-10-09T06:42:35+00:00","og_image":[{"url":"https:\/\/hansesecure.de\/wp-banane\/uploads\/2017\/10\/slae_2_reverseConnect-300x106.jpg","type":"","width":"","height":""}],"author":"HanseSecure","twitter_card":"summary_large_image","twitter_creator":"@CyberWarship","twitter_site":"@CyberWarship","twitter_misc":{"Written by":"HanseSecure","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hansesecure.de\/en\/2017\/10\/slae-assignment-2-tcp-reverse_shell\/#article","isPartOf":{"@id":"https:\/\/hansesecure.de\/en\/2017\/10\/slae-assignment-2-tcp-reverse_shell\/"},"author":{"name":"HanseSecure","@id":"https:\/\/hansesecure.de\/en\/#\/schema\/person\/6ec6ef4887ff2fc97a14f1a7f390f593"},"headline":"SLAE Assignment #2 | TCP Reverse_Shell","datePublished":"2017-10-09T06:42:35+00:00","mainEntityOfPage":{"@id":"https:\/\/hansesecure.de\/en\/2017\/10\/slae-assignment-2-tcp-reverse_shell\/"},"wordCount":147,"commentCount":0,"publisher":{"@id":"https:\/\/hansesecure.de\/en\/#organization"},"image":{"@id":"https:\/\/hansesecure.de\/en\/2017\/10\/slae-assignment-2-tcp-reverse_shell\/#primaryimage"},"thumbnailUrl":"https:\/\/hansesecure.de\/wp-banane\/uploads\/2017\/10\/slae_2_reverseConnect-300x106.jpg","keywords":["Assembler","Linux","Migration","SLAE"],"articleSection":["Deep Dive Techniques"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/hansesecure.de\/en\/2017\/10\/slae-assignment-2-tcp-reverse_shell\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/hansesecure.de\/en\/2017\/10\/slae-assignment-2-tcp-reverse_shell\/","url":"https:\/\/hansesecure.de\/en\/2017\/10\/slae-assignment-2-tcp-reverse_shell\/","name":"SLAE Assignment #2 | TCP Reverse_Shell &#8211; HanseSecure GmbH","isPartOf":{"@id":"https:\/\/hansesecure.de\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/hansesecure.de\/en\/2017\/10\/slae-assignment-2-tcp-reverse_shell\/#primaryimage"},"image":{"@id":"https:\/\/hansesecure.de\/en\/2017\/10\/slae-assignment-2-tcp-reverse_shell\/#primaryimage"},"thumbnailUrl":"https:\/\/hansesecure.de\/wp-banane\/uploads\/2017\/10\/slae_2_reverseConnect-300x106.jpg","datePublished":"2017-10-09T06:42:35+00:00","breadcrumb":{"@id":"https:\/\/hansesecure.de\/en\/2017\/10\/slae-assignment-2-tcp-reverse_shell\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hansesecure.de\/en\/2017\/10\/slae-assignment-2-tcp-reverse_shell\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hansesecure.de\/en\/2017\/10\/slae-assignment-2-tcp-reverse_shell\/#primaryimage","url":"https:\/\/hansesecure.de\/wp-banane\/uploads\/2017\/10\/slae_2_reverseConnect-300x106.jpg","contentUrl":"https:\/\/hansesecure.de\/wp-banane\/uploads\/2017\/10\/slae_2_reverseConnect-300x106.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/hansesecure.de\/en\/2017\/10\/slae-assignment-2-tcp-reverse_shell\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"https:\/\/hansesecure.de\/en\/"},{"@type":"ListItem","position":2,"name":"SLAE Assignment #2 | TCP Reverse_Shell"}]},{"@type":"WebSite","@id":"https:\/\/hansesecure.de\/en\/#website","url":"https:\/\/hansesecure.de\/en\/","name":"HanseSecure GmbH","description":"Choose the Intruder","publisher":{"@id":"https:\/\/hansesecure.de\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hansesecure.de\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/hansesecure.de\/en\/#organization","name":"HanseSecure GmbH","url":"https:\/\/hansesecure.de\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hansesecure.de\/en\/#\/schema\/logo\/image\/","url":"https:\/\/hansesecure.de\/wp-content\/uploads\/2023\/05\/cropped-000-LOGO-intensiv-schwarz-rot-HanseSecure_LOGO_CTI_Vektor_rotes_H11806.png","contentUrl":"https:\/\/hansesecure.de\/wp-content\/uploads\/2023\/05\/cropped-000-LOGO-intensiv-schwarz-rot-HanseSecure_LOGO_CTI_Vektor_rotes_H11806.png","width":512,"height":512,"caption":"HanseSecure GmbH"},"image":{"@id":"https:\/\/hansesecure.de\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/facebook.com\/hansesecure","https:\/\/x.com\/CyberWarship","https:\/\/www.linkedin.com\/company\/hansesecure","https:\/\/www.youtube.com\/channel\/UCAABbKOA_stDFkEKS3MSF7Q","https:\/\/www.instagram.com\/hansesecure\/"]},{"@type":"Person","@id":"https:\/\/hansesecure.de\/en\/#\/schema\/person\/6ec6ef4887ff2fc97a14f1a7f390f593","name":"HanseSecure","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/58fe26b2270315f2ab1268b229465b72c497c86aac3696aaaf2e629ae4e4f0af?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/58fe26b2270315f2ab1268b229465b72c497c86aac3696aaaf2e629ae4e4f0af?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/58fe26b2270315f2ab1268b229465b72c497c86aac3696aaaf2e629ae4e4f0af?s=96&d=mm&r=g","caption":"HanseSecure"}}]}},"_links":{"self":[{"href":"https:\/\/hansesecure.de\/en\/wp-json\/wp\/v2\/posts\/7370","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hansesecure.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hansesecure.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hansesecure.de\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hansesecure.de\/en\/wp-json\/wp\/v2\/comments?post=7370"}],"version-history":[{"count":0,"href":"https:\/\/hansesecure.de\/en\/wp-json\/wp\/v2\/posts\/7370\/revisions"}],"wp:attachment":[{"href":"https:\/\/hansesecure.de\/en\/wp-json\/wp\/v2\/media?parent=7370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hansesecure.de\/en\/wp-json\/wp\/v2\/categories?post=7370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hansesecure.de\/en\/wp-json\/wp\/v2\/tags?post=7370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}