{"id":7,"date":"2024-04-07T21:18:37","date_gmt":"2024-04-07T15:48:37","guid":{"rendered":"https:\/\/crazynoob.net\/?p=7"},"modified":"2024-04-16T00:28:08","modified_gmt":"2024-04-15T18:58:08","slug":"intro-to-the-lesser-known","status":"publish","type":"post","link":"https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/","title":{"rendered":"Intro to the lesser known"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Welcome_back\"><\/span><em>Welcome back<\/em><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Its been a while, from my last article which was written back in 2016. Lot more has changed since then, I have completed few information security certifications started doing a day job and other things. Resuming my blogging was in my to-do list from very long back. So here goes something&#8230;<\/p><div id=\"ez-toc-container\" class=\"ez-toc-v2_0_91 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/#Welcome_back\" >Welcome back<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/#Where_do_we_stand_now\" >Where do we stand now?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/#Binary_exploitation\" >Binary exploitation<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/#What_is_Memory_corruption\" >What is Memory corruption?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/#What_is_a_Program\" >What is a Program<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/#Compilation\" >Compilation<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/#Memory\" >Memory<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/#Registers\" >Registers<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/#Stack\" >Stack<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/#Buffer_overflow\" >Buffer overflow<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n\n<h2 class=\"wp-block-heading has-text-align-justify is-style-default\" style=\"padding-top:0;padding-right:0;padding-bottom:0;padding-left:0\"><span class=\"ez-toc-section\" id=\"Where_do_we_stand_now\"><\/span><em>Where do we stand now?<\/em><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"has-text-align-justify wp-block-paragraph\">Before we start with anything, I want to set the stage so as to understand where are we heading now. As information security professionals we have seen different types of vulnerabilities and what not. Following is a little diagram which will help us understand what are we trying to learn.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"462\" src=\"https:\/\/crazynoob.net\/wp-content\/uploads\/2024\/01\/Exploitation1-1024x462.png\" alt=\"\" class=\"wp-image-8\" srcset=\"https:\/\/crazynoob.net\/wp-content\/uploads\/2024\/01\/Exploitation1-1024x462.png 1024w, https:\/\/crazynoob.net\/wp-content\/uploads\/2024\/01\/Exploitation1-300x135.png 300w, https:\/\/crazynoob.net\/wp-content\/uploads\/2024\/01\/Exploitation1-768x346.png 768w, https:\/\/crazynoob.net\/wp-content\/uploads\/2024\/01\/Exploitation1.png 1460w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-justify wp-block-paragraph\">From the above diagram we can get a hint about what are we going to deal with.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Binary_exploitation\"><\/span><em>Binary exploitation<\/em><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Binary means a set of 2 choices like on\/off, 0\/1, true\/false, etc. In the world of computers principal of binary is at its heart. Binary is used for everywhere in computers from basic mathematics to complex weather predictions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But here binary signifies <a href=\"https:\/\/en.wikipedia.org\/wiki\/Binary_file\">Binary file<\/a> something which is computer readable file which consists of instructions for the computer to execute. Sometimes its also called as executable file referring to but not limited EXE(windows) or ELF(*nix) more examples can be found <a href=\"https:\/\/en.wikipedia.org\/wiki\/Comparison_of_executable_file_formats\">here<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_Memory_corruption\"><\/span><em>What is Memory corruption?<\/em><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Memory corruption is a class of vulnerability which is mainly caused due to programming errors. Causing the program in execution state to display an unintended behavior, crash or even code execution.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_a_Program\"><\/span><em>What is a Program<\/em><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A program is a set of instructions written in a programming language like C\/C++, Java, Rust, Python, etc. Its human a human readable language, containing set of instructions for the computer.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Doesn&#8217;t that makes a <em>program <\/em>and <em>binary <\/em>similar? Like both contains instructions for computer to execute ? Nope. Well <em>a program<\/em> is something what a human can read and write, we cannot do the same with binary. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A program can be complied or interpreted based on the language.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Compilation\"><\/span><em>Compilation <\/em><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Compilation is a multi stage process which transforms a source code to a executable binary. On a higher level the whole process can be broken down into following steps w.r.t. C\/C++ programming language.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Preprocessing: A source code may contain different instructions for the preprocessor like <code>#define<\/code> or <code>#include<\/code> the preprocessor will go ahead and process those. Like for <code>#include<\/code> it would go ahead and include the defined header file into the source code or for <code>#define<\/code> it would expand the macros defined.<\/li>\n\n\n\n<li>Compilation: It takes preprocessor output performs error checking, generates assembly code and then generates object files. The compiler also performs code optimizations trying to improve the performance and reduces the size.<\/li>\n\n\n\n<li>Linking: For each source file one object file is generated now each of them is combined to single executable file.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Memory\"><\/span><em>Memory<\/em><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In very simple terms memory is used for storage of data, be it a movie, song or a game. But there are 2 main types of memory storage&#8217;s in computers Volatile and Non-Volatile.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Volatile:<\/strong> Refers to temporary storage like RAM, CPU registers, cache, etc. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Non-Volatile:<\/strong> Mainly used for storage purpose includes HDD, SSD, etc.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A executable is stored in non-volatile memory on the HDD but when its executed a copy of it is generated in the volatile memory in the RAM. After the execution the program comes to life it performs numerous operations under the hood. More about the memory structure of a program will be covered later in this articles.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Registers\"><\/span><em>Registers<\/em>  <span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Registers\/CPU registers are stored inside the CPU making them fastest memory storage. This registers are categorized into general purpose, segment registers and flag registers. Well there are many more categories but we will only stick to these. Further more following are the general purpose registers which are more important to us.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>64-bit<\/th><th>32-bit<\/th><th>16-bit<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>RAX<\/td><td>EAX<\/td><td>AX<\/td><td>Accumulator<\/td><\/tr><tr><td>RBX<\/td><td>EBX<\/td><td>BX<\/td><td>Base<\/td><\/tr><tr><td>RCX<\/td><td>ECX<\/td><td>CX<\/td><td>Counter<\/td><\/tr><tr><td>RDX<\/td><td>EDX<\/td><td>DX<\/td><td>Data<\/td><\/tr><tr><td>RSI<\/td><td>ESI<\/td><td>SI<\/td><td>Source<\/td><\/tr><tr><td>RDI<\/td><td>EDI<\/td><td>DI<\/td><td>Destination<\/td><\/tr><tr><td><em>RSP<\/em><\/td><td><em>ESP<\/em><\/td><td><em>SP<\/em><\/td><td><em>Stack Pointer<\/em><\/td><\/tr><tr><td><em>RBP<\/em><\/td><td><em>EBP<\/em><\/td><td><em>BP<\/em><\/td><td><em>Stack Base Pointer<\/em><\/td><\/tr><tr><td><em>RIP<\/em><\/td><td><em>EIP<\/em><\/td><td><em>IP<\/em><\/td><td><em>Instruction Pointer<\/em><\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">General purpose registers<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Stack\"><\/span><em>Stack<\/em><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Stack provides static memory allocation to a process. There are 2 basic operations which can be done on a stack i.e. PUSH and POP, for which it makes use of the <em>Stack Pointer <\/em>and <em>Stack Base Pointer<\/em> registers from the above table.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Buffer_overflow\"><\/span><em>Buffer overflow<\/em><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"has-text-align-justify wp-block-paragraph\">Before understanding what is &#8220;buffer overflow&#8221;, lets first try to understand <mark style=\"background-color:rgba(0, 0, 0, 0);color:#000000\" class=\"has-inline-color\"><strong>What is a buffer? <\/strong><\/mark><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A <a href=\"https:\/\/en.wikipedia.org\/wiki\/Data_buffer\">buffer<\/a> is a temporary storage, which can be used for storing user input or any data used for processing. Following is example buffer being used, which copies input from the command line argument to the buffer &#8220;user_name&#8221; using <a href=\"https:\/\/linux.die.net\/man\/3\/strcpy\">strcpy<\/a> function and prints it.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"#include&lt;stdio.h&gt;\n#include&lt;string.h&gt;\n \/\/ gcc file_name.c -o sayhello\nint say_hello(char * argument) {\n  char user_name[16]; \/\/allocating buffer\n  strcpy(user_name, argument); \/\/copy data using strcpy\n  printf(&quot;Hello %s\\n&quot;, user_name);\n  return 0\n}\nint main(int argc, char * argv[]) {\n  say_hello(argv[1]);\n  return 0;\n}\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #5E81AC; font-weight: bold\">#<\/span><span style=\"color: #81A1C1\">include<\/span><span style=\"color: #ECEFF4\">&lt;<\/span><span style=\"color: #8FBCBB\">stdio.h<\/span><span style=\"color: #ECEFF4\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #5E81AC; font-weight: bold\">#<\/span><span style=\"color: #81A1C1\">include<\/span><span style=\"color: #ECEFF4\">&lt;<\/span><span style=\"color: #8FBCBB\">string.h<\/span><span style=\"color: #ECEFF4\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\"> <\/span><span style=\"color: #616E88\">\/\/ gcc file_name.c -o sayhello<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">int<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">say_hello<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #81A1C1\">char<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">*<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">argument<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #81A1C1\">char<\/span><span style=\"color: #D8DEE9FF\"> user_name<\/span><span style=\"color: #ECEFF4\">[<\/span><span style=\"color: #B48EAD\">16<\/span><span style=\"color: #ECEFF4\">]<\/span><span style=\"color: #81A1C1\">;<\/span><span style=\"color: #616E88\"> \/\/allocating buffer<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #88C0D0\">strcpy<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #D8DEE9FF\">user_name<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> argument<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><span style=\"color: #616E88\"> \/\/copy data using strcpy<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #88C0D0\">printf<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Hello %s<\/span><span style=\"color: #EBCB8B\">\\n<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> user_name<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #81A1C1\">return<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">0<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">int<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">main<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #81A1C1\">int<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">argc<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">char<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">*<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">argv<\/span><span style=\"color: #81A1C1\">[]<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #88C0D0\">say_hello<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #D8DEE9FF\">argv<\/span><span style=\"color: #ECEFF4\">[<\/span><span style=\"color: #B48EAD\">1<\/span><span style=\"color: #ECEFF4\">])<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #81A1C1\">return<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">0<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">So now coming back to <mark style=\"background-color:rgba(0, 0, 0, 0);color:#000000\" class=\"has-inline-color\"><strong>What is buffer overflow?<\/strong><\/mark> Simply saying its a direct or indirect process of writing data beyond the buffer limit in order to manipulate the execution flow of the program. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the coming article we will take a deep dive into workings of registers and stack.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome back Its been a while, from my last article which was written back in 2016. Lot more has changed since then, I have completed few information security certifications started doing a day job and other things. Resuming my blogging was in my to-do list from very long back. So here goes something&#8230; Where do &#8230; <a title=\"Intro to the lesser known\" class=\"read-more\" href=\"https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/\" aria-label=\"Read more about Intro to the lesser known\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":144,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Intro to the lesser known - Crazynoob<\/title>\n<meta name=\"description\" content=\"Before we start with anything, I want to set the stage so as to understand where are we heading now. As information security professionals we might have seen different types of vulnerabilities and what not.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Intro to the lesser known - Crazynoob\" \/>\n<meta property=\"og:description\" content=\"Before we start with anything, I want to set the stage so as to understand where are we heading now. As information security professionals we might have seen different types of vulnerabilities and what not.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/\" \/>\n<meta property=\"og:site_name\" content=\"Crazynoob\" \/>\n<meta property=\"article:published_time\" content=\"2024-04-07T15:48:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-15T18:58:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/crazynoob.net\/wp-content\/uploads\/2024\/04\/Quotefancy-1767640-3840x2160-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"3840\" \/>\n\t<meta property=\"og:image:height\" content=\"2160\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"noob\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"noob\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\\\/\\\/crazynoob.net\\\/index.php\\\/2024\\\/04\\\/07\\\/intro-to-the-lesser-known\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/crazynoob.net\\\/index.php\\\/2024\\\/04\\\/07\\\/intro-to-the-lesser-known\\\/\"},\"author\":{\"name\":\"noob\",\"@id\":\"https:\\\/\\\/crazynoob.net\\\/#\\\/schema\\\/person\\\/c44aab508373661773c0f05e51bbdc26\"},\"headline\":\"Intro to the lesser known\",\"datePublished\":\"2024-04-07T15:48:37+00:00\",\"dateModified\":\"2024-04-15T18:58:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/crazynoob.net\\\/index.php\\\/2024\\\/04\\\/07\\\/intro-to-the-lesser-known\\\/\"},\"wordCount\":832,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/crazynoob.net\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/crazynoob.net\\\/index.php\\\/2024\\\/04\\\/07\\\/intro-to-the-lesser-known\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/crazynoob.net\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/Quotefancy-1767640-3840x2160-1.jpg\",\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/crazynoob.net\\\/index.php\\\/2024\\\/04\\\/07\\\/intro-to-the-lesser-known\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/crazynoob.net\\\/index.php\\\/2024\\\/04\\\/07\\\/intro-to-the-lesser-known\\\/\",\"url\":\"https:\\\/\\\/crazynoob.net\\\/index.php\\\/2024\\\/04\\\/07\\\/intro-to-the-lesser-known\\\/\",\"name\":\"Intro to the lesser known - Crazynoob\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/crazynoob.net\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/crazynoob.net\\\/index.php\\\/2024\\\/04\\\/07\\\/intro-to-the-lesser-known\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/crazynoob.net\\\/index.php\\\/2024\\\/04\\\/07\\\/intro-to-the-lesser-known\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/crazynoob.net\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/Quotefancy-1767640-3840x2160-1.jpg\",\"datePublished\":\"2024-04-07T15:48:37+00:00\",\"dateModified\":\"2024-04-15T18:58:08+00:00\",\"description\":\"Before we start with anything, I want to set the stage so as to understand where are we heading now. As information security professionals we might have seen different types of vulnerabilities and what not.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/crazynoob.net\\\/index.php\\\/2024\\\/04\\\/07\\\/intro-to-the-lesser-known\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/crazynoob.net\\\/index.php\\\/2024\\\/04\\\/07\\\/intro-to-the-lesser-known\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/crazynoob.net\\\/index.php\\\/2024\\\/04\\\/07\\\/intro-to-the-lesser-known\\\/#primaryimage\",\"url\":\"https:\\\/\\\/crazynoob.net\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/Quotefancy-1767640-3840x2160-1.jpg\",\"contentUrl\":\"https:\\\/\\\/crazynoob.net\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/Quotefancy-1767640-3840x2160-1.jpg\",\"width\":3840,\"height\":2160},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/crazynoob.net\\\/index.php\\\/2024\\\/04\\\/07\\\/intro-to-the-lesser-known\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/crazynoob.net\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Intro to the lesser known\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/crazynoob.net\\\/#website\",\"url\":\"https:\\\/\\\/crazynoob.net\\\/\",\"name\":\"Crazynoob\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/crazynoob.net\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/crazynoob.net\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/crazynoob.net\\\/#organization\",\"name\":\"Crazynoob\",\"url\":\"https:\\\/\\\/crazynoob.net\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/crazynoob.net\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/crazynoob.net\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/cropped-Crazynoob.png\",\"contentUrl\":\"https:\\\/\\\/crazynoob.net\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/cropped-Crazynoob.png\",\"width\":761,\"height\":752,\"caption\":\"Crazynoob\"},\"image\":{\"@id\":\"https:\\\/\\\/crazynoob.net\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/crazynoob.net\\\/#\\\/schema\\\/person\\\/c44aab508373661773c0f05e51bbdc26\",\"name\":\"noob\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/crazynoob.net\\\/wp-content\\\/litespeed\\\/avatar\\\/8b04e4228776f34753e6e5ba1874b999.jpg?ver=1795477321\",\"url\":\"https:\\\/\\\/crazynoob.net\\\/wp-content\\\/litespeed\\\/avatar\\\/8b04e4228776f34753e6e5ba1874b999.jpg?ver=1795477321\",\"contentUrl\":\"https:\\\/\\\/crazynoob.net\\\/wp-content\\\/litespeed\\\/avatar\\\/8b04e4228776f34753e6e5ba1874b999.jpg?ver=1795477321\",\"caption\":\"noob\"},\"sameAs\":[\"https:\\\/\\\/crazynoob.net\"],\"url\":\"https:\\\/\\\/crazynoob.net\\\/index.php\\\/author\\\/noob\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Intro to the lesser known - Crazynoob","description":"Before we start with anything, I want to set the stage so as to understand where are we heading now. As information security professionals we might have seen different types of vulnerabilities and what not.","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:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/","og_locale":"en_US","og_type":"article","og_title":"Intro to the lesser known - Crazynoob","og_description":"Before we start with anything, I want to set the stage so as to understand where are we heading now. As information security professionals we might have seen different types of vulnerabilities and what not.","og_url":"https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/","og_site_name":"Crazynoob","article_published_time":"2024-04-07T15:48:37+00:00","article_modified_time":"2024-04-15T18:58:08+00:00","og_image":[{"width":3840,"height":2160,"url":"https:\/\/crazynoob.net\/wp-content\/uploads\/2024\/04\/Quotefancy-1767640-3840x2160-1.jpg","type":"image\/jpeg"}],"author":"noob","twitter_card":"summary_large_image","twitter_misc":{"Written by":"noob","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/#article","isPartOf":{"@id":"https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/"},"author":{"name":"noob","@id":"https:\/\/crazynoob.net\/#\/schema\/person\/c44aab508373661773c0f05e51bbdc26"},"headline":"Intro to the lesser known","datePublished":"2024-04-07T15:48:37+00:00","dateModified":"2024-04-15T18:58:08+00:00","mainEntityOfPage":{"@id":"https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/"},"wordCount":832,"commentCount":2,"publisher":{"@id":"https:\/\/crazynoob.net\/#organization"},"image":{"@id":"https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/#primaryimage"},"thumbnailUrl":"https:\/\/crazynoob.net\/wp-content\/uploads\/2024\/04\/Quotefancy-1767640-3840x2160-1.jpg","articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/","url":"https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/","name":"Intro to the lesser known - Crazynoob","isPartOf":{"@id":"https:\/\/crazynoob.net\/#website"},"primaryImageOfPage":{"@id":"https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/#primaryimage"},"image":{"@id":"https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/#primaryimage"},"thumbnailUrl":"https:\/\/crazynoob.net\/wp-content\/uploads\/2024\/04\/Quotefancy-1767640-3840x2160-1.jpg","datePublished":"2024-04-07T15:48:37+00:00","dateModified":"2024-04-15T18:58:08+00:00","description":"Before we start with anything, I want to set the stage so as to understand where are we heading now. As information security professionals we might have seen different types of vulnerabilities and what not.","breadcrumb":{"@id":"https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/#primaryimage","url":"https:\/\/crazynoob.net\/wp-content\/uploads\/2024\/04\/Quotefancy-1767640-3840x2160-1.jpg","contentUrl":"https:\/\/crazynoob.net\/wp-content\/uploads\/2024\/04\/Quotefancy-1767640-3840x2160-1.jpg","width":3840,"height":2160},{"@type":"BreadcrumbList","@id":"https:\/\/crazynoob.net\/index.php\/2024\/04\/07\/intro-to-the-lesser-known\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/crazynoob.net\/"},{"@type":"ListItem","position":2,"name":"Intro to the lesser known"}]},{"@type":"WebSite","@id":"https:\/\/crazynoob.net\/#website","url":"https:\/\/crazynoob.net\/","name":"Crazynoob","description":"","publisher":{"@id":"https:\/\/crazynoob.net\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/crazynoob.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/crazynoob.net\/#organization","name":"Crazynoob","url":"https:\/\/crazynoob.net\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/crazynoob.net\/#\/schema\/logo\/image\/","url":"https:\/\/crazynoob.net\/wp-content\/uploads\/2024\/02\/cropped-Crazynoob.png","contentUrl":"https:\/\/crazynoob.net\/wp-content\/uploads\/2024\/02\/cropped-Crazynoob.png","width":761,"height":752,"caption":"Crazynoob"},"image":{"@id":"https:\/\/crazynoob.net\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/crazynoob.net\/#\/schema\/person\/c44aab508373661773c0f05e51bbdc26","name":"noob","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/crazynoob.net\/wp-content\/litespeed\/avatar\/8b04e4228776f34753e6e5ba1874b999.jpg?ver=1795477321","url":"https:\/\/crazynoob.net\/wp-content\/litespeed\/avatar\/8b04e4228776f34753e6e5ba1874b999.jpg?ver=1795477321","contentUrl":"https:\/\/crazynoob.net\/wp-content\/litespeed\/avatar\/8b04e4228776f34753e6e5ba1874b999.jpg?ver=1795477321","caption":"noob"},"sameAs":["https:\/\/crazynoob.net"],"url":"https:\/\/crazynoob.net\/index.php\/author\/noob\/"}]}},"_links":{"self":[{"href":"https:\/\/crazynoob.net\/index.php\/wp-json\/wp\/v2\/posts\/7","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/crazynoob.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/crazynoob.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/crazynoob.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/crazynoob.net\/index.php\/wp-json\/wp\/v2\/comments?post=7"}],"version-history":[{"count":9,"href":"https:\/\/crazynoob.net\/index.php\/wp-json\/wp\/v2\/posts\/7\/revisions"}],"predecessor-version":[{"id":143,"href":"https:\/\/crazynoob.net\/index.php\/wp-json\/wp\/v2\/posts\/7\/revisions\/143"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/crazynoob.net\/index.php\/wp-json\/wp\/v2\/media\/144"}],"wp:attachment":[{"href":"https:\/\/crazynoob.net\/index.php\/wp-json\/wp\/v2\/media?parent=7"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/crazynoob.net\/index.php\/wp-json\/wp\/v2\/categories?post=7"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/crazynoob.net\/index.php\/wp-json\/wp\/v2\/tags?post=7"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}