<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jake Mellichamp on Medium]]></title>
        <description><![CDATA[Stories by Jake Mellichamp on Medium]]></description>
        <link>https://medium.com/@jakemellichamp?source=rss-5e3f5b66bfb1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*xK0f_7twt1TgmErH7lmNaQ.jpeg</url>
            <title>Stories by Jake Mellichamp on Medium</title>
            <link>https://medium.com/@jakemellichamp?source=rss-5e3f5b66bfb1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 09:24:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jakemellichamp/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Eternal Pursuit of Unhappiness]]></title>
            <link>https://jakemellichamp.medium.com/the-eternal-pursuit-of-unhappiness-95668b5591df?source=rss-5e3f5b66bfb1------2</link>
            <guid isPermaLink="false">https://medium.com/p/95668b5591df</guid>
            <category><![CDATA[career-advice]]></category>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[leadership]]></category>
            <category><![CDATA[computer-science]]></category>
            <dc:creator><![CDATA[Jake Mellichamp]]></dc:creator>
            <pubDate>Tue, 21 Jan 2025 11:48:54 GMT</pubDate>
            <atom:updated>2025-01-21T11:48:54.296Z</atom:updated>
            <content:encoded><![CDATA[<p>Navigating Life with Constant Dissatisfaction</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b7ogZBsBJz18Gh4eqsWZhg.png" /></figure><p>When you first see a copy of this <a href="https://www.goodreads.com/en/book/show/22925205-the-eternal-pursuit-of-unhappyness">book</a> you’ll see it’s front page with the iconic “<em>The Eternal Pursuit of Unhappiness”</em> title, and then a subtitle directory below: “Being very good is no good. You have to be very, very, very, very, good”. That’s right, FIVE verys.</p><p><a href="https://archive.org/details/tepou-ogilvy-book/mode/2up">Eternal Pursuit of Unhappiness: Being Very Good Is No Good,You Have to Be Very, Very, Very, Very, Very Good (eBook) : Ogilvy &amp; Mather : Free Download, Borrow, and Streaming : Internet Archive</a></p><p>It’s very rare that a book will grab my attention from JUST the title. I thought we weren’t supposed to judge books from the cover, but this one grabbed me — and I’m glad I went down the adventure of reading it. I will reflect on this through the lens of a Software Engineer and Cyber Security professional, but I imagine that this can be related-able to any profession — lets get into it!</p><h3>Who Is this for?</h3><p>Hey! Thanks for checking out and reading this blog post. I want to throw a quick disclaimer that this way of thinking is for those that take business ‘seriously’. For those who have a passion for striving for achievement. There is a casual way of going about business that I honestly have respect for. The things that are written below are for those that wish to push themselves beyond what is comfortable.</p><h3>Divine Discontent</h3><blockquote>We Have a habit of divine discontent with our performance, It is an antidote to smugness<em> — David </em>Ogilvy</blockquote><p>Right off the rip, this book seems to be talking to the readers subconscious (at least my subconscious). David knows that for his target audience, they all have a sense of <em>discontent</em>. We’ve all done something we’re pretty proud of in our line of work — only to scroll down youtube/x.com/tiktok and see someone do a feat 10x more impressive. It might sound depressing to always have those thoughts, but this sense of constant discontent can be harnessed as a motivational driving force and hence — the <em>pursuit of unhappiness.</em> David Ogilvy interprets the words as follows:</p><ul><li>DON’T BOW YOUR HEAD</li><li>DON’T KNOW YOUR PLACE</li><li>DON’T GIVE IN. DON’T GIVE UP</li><li>DON’T BE SO EASILY HAPPY WITH YOURSELF</li><li>DON’T GO GENTLE INTO THAT GOOD NIGHT</li></ul><p>There were more words David used, but I think we get the gist. This guy is hard-core — quite the extreme philosophy! The remainder of this article will be about defining the habits that make this possible.</p><h3>Vices and Virtues</h3><p>The book talks about replacing 8 vice’s with 8 creative virtues. When it comes to gaining confidence and maturity in life — our virtues and morals are what allow us to sleep at night knowing we ‘are a good person’ or ‘had a great day’. I Encourage you, the reader, to reflect on your own virtues before settling in and reading this list.</p><ul><li>Fear → Courage</li><li>Expedience → idealism</li><li>The Status Quo → Curiosity</li><li>Borinng → Playfulness</li><li>Tyranny of Politeness → Candor</li><li>Cold Arithmetic → Intuition</li><li>Bureaucracy → Free-Spiritness</li><li>Giving in → Persistence</li></ul><h3>Courage</h3><blockquote>There’s No shortage of brains in the industry. It’s the ‘[Spine]’ that tends to be missing</blockquote><p>What a quote right? There are plenty of intelligent people in this world we live in, heck there’s even an AI that can just about solve any trivial problem. It’s Courage. It’s Courage. It’s Courage. That enables — or even BEGS — us to do something worthwhile in our lives. Fear is what leads to self-doubt and it is constantly grasping at our ankles to stay docile and not take risk.</p><p>In the shower. On a Noon walk. During a long car ride. The cozy moments that pass before we finally go to sleep. I guarantee you have no shortage of interesting ideas. All ideas truly are as David states it ‘fragile seeds that require protecting’. Think of those Ideas and protect them! Have a Spine! This whole fear &amp; self-doubt is what is holding you back from even trying! Be Courageous. Be Daring.</p><h3>Idealism</h3><blockquote>Raise your Sights! Blaze new trails! Compete with the immortals!</blockquote><p>Guys, how often do we find ourselves just living in absolute POVERTY of ambition. We get so focused in on completing the next User Story. Making the next deliverable. Writing the next blog post that we fail to think about really impactful actions to take and build up too.</p><p>When our dreams are little we become little. How great we become depends on the SIZE of our dreams. In this modern world where everything is always grabbing for your attention it can be hard to simply find the time to even THINK about what it is we want to aspire to create and build. We can be placed into a continued lull, a continued trace of content. Where life is ‘just good enough’ to not think too heavily about these things. Dream BIG. Put those goals out there, in the public eye, and achieve them!</p><h3>Curiosity</h3><blockquote>An endless trail of ideas floats in the ether. You will only see them if you are curious.</blockquote><p>Luckily for my cyber colleagues who are reading this — your profession probably already required a bit of curiosity to even get where you are today. The only way you get good at Cybersecurity is by asking ‘why’ ‘why’ ‘why’ pulling layers of abstraction away until your left with its naked truth in assembly. It’s pretty crazy how spectacular the human imagination is. Living life in a natural state of curiosity allows you to grow — to experience knew ideas. “<em>When we’ve lost the capacity to see the world and everything in it as new: unreasonable, bewildering and something that gives rise to astonishment, we have become dim-sighted and stooped with age”</em> .</p><p>Although its good be curious in a business setting — attempting to find that perfect product-market-fit or experimenting with different engineering processes. This is truly just a beautiful way to live ones life. Never utter the phrase <em>“Ahh, because I’m xyz old… because I’m xyz years behind the curve… I won’t be able to do this”.</em> I know that this isn’t a one-for-one correlation to curiosity, but if your mind craves the urge for a new experience DO NOT shut down the idea due to preconceived failings. This relates to any activity in life: Starting to sail. Learning to saw wood. Learning to fly a plane! Don’t close your eyes to the possibilities that continue to surround ourselves.</p><h3>Playfulness</h3><blockquote>We are all born children. The trick is to remain one — Pablo Picasso.</blockquote><p>All art and science have been invented by playful people, <strong><em>not</em></strong> serious people. Taking life seriously grounds one’s mind in the past to where it can never invent something new. It’s based in reason. To unleash the ‘left-brain’ so to speak — David encourages us to ‘have fun in life.’ Maybe show up to work in a funky suite. Wear a cowboy hat. Make an absurd joke during a weekly business meeting. If you remember at the beginning of this book, the ‘divine discontent’ did not seem to have much room for the idea of ‘fun’ or ‘playfulness’ but here we are being told it’s a virtue? I think it goes to show ‘playing’ and ‘working’ need to somehow go hand-in-hand. How can we make a job more fun?</p><h3>Candor</h3><blockquote>We only get a spark when the stone and flint are moving in opposite directions.</blockquote><p>I won’t go too into detail on this topic — I already wrote a blog post about how being polite isn’t efficient in business. There are a lot of successful businesses that carry this same mantra. I believe it was written within Jeff Bezos’ shareholder letters that <em>“If I was given the opportunity to agree or argue on a given issue — I will choose argue 100% of the time — because the outcome of arguing is always a more beautiful result.”</em> Steve Jobs had a similar mindset, but had the metaphor of a ‘rock tumbler’ grinding rocks into smooth stone.</p><blockquote>Through the team, through that group of incredibly talented people bumping up against each other, having arguments, having fights sometimes, making some noise, and working together, they polish each other and they polish the ideas, and what comes out are these really beautiful stones. — Steve Jobs.</blockquote><p>What can we takeaway from all these platitudes of Candor? Why is candor viewed in a bad eye? In the examples above it mentions candor with beauty — but in some linkedin circles you might get shamed for mentioning such a thing. In the situations mentioned above, I am sure both parties were coming <em>AT EACHOTHER</em> with candor. It’s a question of hiring! If you hire people and surround yourself with people that also enjoy candor — you will polish yourself. These people are the way they are not because they are judgemental of others — they have a internal standard of excellence or a certain ‘instinct’ of when something is not optimal and aren’t afraid to call it out. Never take the candor personal. Relay the candor into a ‘joust’ between coworkers — may the best idea win.</p><h3>Intuition</h3><blockquote>Our business needs massive transfusions of talent. And talent. I believe, is most likely to be found among nonconformists, dissenters, and rebels. — D.O</blockquote><p>Intuition is the art of listening to the guru within us. The best ideas are the ones not from the logical side of the mind — but gifts from the unconscious part. In every modern business, numbers, calculations, and evidence is needed before business decisions are made. What is this bureaucratic nonsense ? When it comes to making innovative ideas, D.O is trying to tell us that our subconscious knows what it knows. It doesn’t need the 5 months of research to prove weather or not an idea is worth persueing. We are problem solvers. Be creative with your solutions and don’t rely on metrics and data at all times. Be a little ‘cracked’ be a little manic. Some ideas don’t need justification. Just do the damn thing!</p><h3>Free-Spiritedness</h3><p>I’m going to quote the book here directly because of how hilarious this paragraph is:</p><blockquote>The creative process can broadly be divided into three stages.</blockquote><blockquote>— One stage is for the mind to gather its raw materials.</blockquote><blockquote>— Stage two is the mental digestion of the raw materials</blockquote><blockquote>— The third and final phase is to get down on your knees and pray that the ideas will come.</blockquote><p>Problem solving is a gamble. It’s terrifying! I can’t emphasis this enough, the amount of Project features that have been slammed on my desk! There isn’t a solution in sight for how to build this thing — however like D.O mentions, we break the process down into stages. Digest the information that is needed to battle the problem in front of you — and let those ideas flow! It can be overwhelming. Especially if there are subsystems that depend on one antoher. You mind will be calculating possibilities exponentially with the amount of variables that are at play.</p><p>What then do we do with this? The answer is not ‘more meetings’ the answer is more or less to become ‘alchemists’. Allow your subconscious to pull the rabbit out of the hat for you — when can be done in a relaxed environment where you are allowed to make mistakes, experiment, and break a standard-or-two.</p><h3>Persistence</h3><blockquote>Dogged Determination is often the only trait that separates a moderately creative person from a highly creative one.</blockquote><p>Ignorance, believe it or not, can sometimes be an asset. Experience can make us come to conclusions before trying. If you think you don’t know you know something, you think you don’t know. You open your eyes. Try. Try. Try. Look. Look. Look. The idea of invention is seeing the same thing people have always seen, but thinking of something else.</p><h3>Conclusion</h3><p>It’s crazy that this book was never officially published. It’s actually just an ‘on-boarding book’ for new hires to get in with the company culture. Crazy right? So yeah — those are the 8 habits that create a feeling of ‘divine discontent’. Have you always felt these virtues? Is this a new idea for you? Is there something you would change? Leave a comment below or message me on x.com ! Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95668b5591df" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop Being a Polite Engineer]]></title>
            <link>https://jakemellichamp.medium.com/stop-being-a-polite-engineer-4ad3ebf99c46?source=rss-5e3f5b66bfb1------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ad3ebf99c46</guid>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[remote-working]]></category>
            <category><![CDATA[leadership]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Jake Mellichamp]]></dc:creator>
            <pubDate>Tue, 14 Jan 2025 11:54:30 GMT</pubDate>
            <atom:updated>2025-01-14T11:54:30.173Z</atom:updated>
            <content:encoded><![CDATA[<h4>How I would Lead a Remote-First Company.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X7EbUfJagvnSiofMJLRYFQ.png" /></figure><p>It’s 2025, and if you haven’t noticed — there are still whispers of a <strong><em>Remote Work vs Office Work Productivity.</em></strong> Random research papers, blog posts, and social media unitize stats that are always contradicting each-other and proving one side more efficient than the other. I cringe reading these types of articles mostly because the stats are meaningless. Companies are composed of people, and if I want to answer the question ‘How can I ensure my company can still be effective as a Remote-First Company?’ That answer all boils down to the type of <strong><em>people</em></strong> your company has hired. What I will argue in this post is that there is a lack of candidness In some organizations (In particular Software Organizations) that hold the organization back. People are too afraid to be honest and too concerned in being polite.</p><h3>The Problem of Politeness</h3><p>Organizations come to life because they solve a problem a group of people agree needs solving. Therefore the people tasked with making the product are nothing more than problem solvers. Here’s a fun thought experiment: strip all the titles and accolades away and really your coworkers and teammates are all bound together to solve a particular set of problems. If we <strong><em>don’t</em></strong> know the unlovely truth in the details of the problem we are attempting to solve, how are we going to go about the business of problem solving? There is such a tendency ‘to be nice’ and avoid telling the honest truth in human beings — that it might be considered a characteristic of human nature.</p><p>This will not cut it in a remote work environment. When product features are presented, when prioritizes of work are being discussed — be honest. How are these changes going to effect my customers? Is this what my customers want? How about my potential leads — will this sway their opinion to buy my product? How will these new features and prioritized work help sell the product.</p><p>I bring this up in the context of remote-work-environments because I believe teams can get into a ‘lull’ of living their own individual life without considering how work will benefit/cost the company in the long run (1–3 years down the line). There is a casual way of going about business that has the potential to make a company fall to irrelevancy if it does not course correct. The way to stop this casualness is being candor, being honest, with the fellow engineers and stake-holders of the project.</p><h3>Don’t be a jerk.</h3><p>Myself advocating for engineers to ‘stop being polite’ is not the same as me advocating for engineers to ‘be more of a jerk’ — Have you seen GitHub PR reviews? That is already enough of a battlefield. There are ways to be honest that don’t involve being rude. I have listed below some common interactions that I find myself and how I would interpret them:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7f8f1e78786def4ac59f5f12892427a5/href">https://medium.com/media/7f8f1e78786def4ac59f5f12892427a5/href</a></iframe><p><em>(That last one is personal — I’ve been a victim of it many times)</em></p><h3>Conclusion</h3><p>So, how are we going to ensure a company can be productive in a Remote-First Environment? The PEOPLE working on the product will decide. It certainly will help if the team involved can work in an honest and candor fashion. There are business books and theories on what makes a successful business team. All I’m saying is by being polite in the present — you’re robbing your teammates of making the best informed decisions of the future. Depending on when that future is… could make or break your product! So speak up! Be unapologetically honest if you have a disagreement!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ad3ebf99c46" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Current State of How Software is Sold]]></title>
            <link>https://jakemellichamp.medium.com/the-current-state-of-how-software-is-sold-f73a8b3f954f?source=rss-5e3f5b66bfb1------2</link>
            <guid isPermaLink="false">https://medium.com/p/f73a8b3f954f</guid>
            <category><![CDATA[cicd]]></category>
            <category><![CDATA[business]]></category>
            <category><![CDATA[leadership]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[marketing]]></category>
            <dc:creator><![CDATA[Jake Mellichamp]]></dc:creator>
            <pubDate>Wed, 24 Jul 2024 03:11:10 GMT</pubDate>
            <atom:updated>2024-07-29T19:51:30.227Z</atom:updated>
            <content:encoded><![CDATA[<h3>As Subscription-Based Software Products dominate, is there any hope to owning Software?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l_naiF2R4UgaMweub29Rqw.png" /><figcaption><em>Thank you ChatGPT for a quick Cover Image</em></figcaption></figure><p>Another Weekday morning, I was sitting at the computer.. reading some blog post on <a href="https://lobste.rs/">lobste.rs</a> about computer science… drinking coffee. What made this morning different was an email from Spotify. “Dear User, we are increasing the subscription cost of the Spotify service from $11 a month to $12.” Oh man, what tragic news, another dollar gone to subscription services.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*ITA7ZsZiaChy87HDXpavcw.png" /></figure><p><em>Another sip of the coffee… Wait a second… I remember this email… Didn’t I receive a price increase notification last year? </em><strong><em>Yes, Yes I did.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*tlqgchE96BX62PSAWb1dXg.png" /></figure><p>Holy smokes, so you’re saying Spotify just increased it’s Sale’s Revenue by 20% over the course of 2 years and <a href="https://www.forbes.com/sites/jackkelly/2024/04/26/spotifys-recent-layoffs-impacted-the-company-more-than-anticipated/">laid off 1,500 workers</a>?! That’s one way to reach profitability. In some aspects I respect the business savy-ness of the leaders at Spotify. As a consumer though, I’m annoyed and concerned about this trend. Are we really just going to allow software companies to demand we pay an extra 10% every couple years?</p><h3>The Subscription based business Model</h3><p>I remember begging my parents for $15 a month so I could play <em>Pirates of the Caribbean online</em> and <em>World Of Warcraft</em>. The Subscription based business model has been around for some time now. Truthfully, I have no idea if subscription based software existed for enterprises back in 2000, but I do remember it in gaming. Dare I say Netflix was the company that introduced this type of software business model to the masses at the start of the digital-streaming era. What hurts is that previously ‘Buy once and install it on your PC’ software transformed into subscription based software. (<em>I’m looking at you Adobe and Microsoft Office)</em>.</p><p>Subscription based software <strong>MAKES SENSE</strong> when all users of a platform need to be in lock-step in terms of updates/patches in order for the software to work.</p><p>Subscription based software <strong>DOES NOT MAKE SENSE</strong> when a standalone release can work autonomously with an individual.</p><p>How did we end up in a world where the only option is to rent software?</p><h3>Think of the Shareholders!</h3><p>Software is a tricky business. A majority of software-based businesses require Venture Capitol funding to get started. I have a ‘loose belief’ that the moment a Software Company has to start answering to investors, the more likely it is that a subscription based model will take hold. The reason behind this is relatively simple, it’s profitable and guarantees passive income. A subscription based model approach is what investors are interested in, its becoming increasingly rare that this is a favorable approach for consumers.</p><h3>Continuous Updates and Delivery (CI/CD)</h3><p>Software is now released differently than it was in the 2000s. Almost any device comes with some form of internet connectivity — different from those days of Windows XP. This does legitimize the need for a subscription based model, I mean, we consumers are paying developers to continuously update software. It’s relatively easy to publish updates to software and lock users out of the application without updating first.</p><p>I think this is a ‘shallow’ and ‘simple’ way of maintaining software. I’ve worked on projects that work this way — and I will state that it is much easier to tell someone ‘just update to version xyz’ instead of maintaining 8 different versions of software. So many CVE’s to patch.</p><p>That being said, are we over complicating things when it comes to releasing simple tools and services? When we release software, in an ideal world the product should come standalone — and some minor things fixed up here and there. Does every user really need the latest and greatest features AND maintenance patches? Can we release software features and maintenance updates separately?</p><h3>What do we do with this?</h3><p>I do believe that this creates some excitement for small development studios just or solo entrepreneurs. A different way of marketing and selling your product all together, ‘<strong>One-Time-Purchasable Software’.</strong></p><p>Whether there is a market need or not, <strong><em>there is a clear lack of ‘One-Time-Purchasable’ software</em></strong>. I think this presents an opportunity for new organizations to build something cool and sell it in a way that is unique. Imagine selling a service that has 80% the functionality of a subscription based tool — and selling it as a One-Time-Purchasable thing! Sell the software by Major version releases instead of a continuous update-able service!</p><p>You could even still have a monolithic release that everyone is required to be updated on — and abstract the ‘major release features’ with <strong><em>Feature flags</em></strong>. That is, code logic + licensing software that lets users do certain things based on the type of subscription they purchased.</p><p>Creating an installable executable &amp; managing software licenses will be the only headache going forward with a <em>‘One-Time-Purchasable’</em> software. Especially if you want to have a 7-day free trial period.</p><h3>Conclusion</h3><p>While the subscription-based model isn’t going away anytime soon for the companies we cherish, it’s worth noting that our industry could benefit from more creativity in marketing solutions to consumers. Personally, I would have been perfectly content continuing with my original $10 Spotify subscription, even without the fancy ‘DJ’, ‘Daylist Playlist Creation’, and ‘A Day in Review’ features. Offering software in alternative ways, such as one-time purchases, might be the key to breaking into the market share dominated by industry leaders. By exploring diverse sales strategies, we can create more competitive and consumer-friendly options.</p><p><em>Main Takeaways:</em><br>Subscription based software <strong>MAKES SENSE</strong> when all users of a platform need to be in lock-step in terms of updates/patches in order for the software to work.</p><p>Subscription based software <strong>DOES NOT MAKE SENSE</strong> when a standalone release can work autonomously with an individual.</p><p>Let me know your thoughts below!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f73a8b3f954f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building and Debugging a Windows Driver]]></title>
            <link>https://jakemellichamp.medium.com/building-and-debugging-a-windows-driver-bed1eaf7ad4e?source=rss-5e3f5b66bfb1------2</link>
            <guid isPermaLink="false">https://medium.com/p/bed1eaf7ad4e</guid>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[windbg]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[c]]></category>
            <category><![CDATA[kernel]]></category>
            <dc:creator><![CDATA[Jake Mellichamp]]></dc:creator>
            <pubDate>Mon, 13 Nov 2023 03:53:09 GMT</pubDate>
            <atom:updated>2023-11-13T03:53:09.998Z</atom:updated>
            <content:encoded><![CDATA[<h4>Win32 Kernel Chronicles</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q09DUgCdUDFEkEusleeCVw.png" /><figcaption>Welcome to the Win32 Kernel Chronicles</figcaption></figure><p>Alright internet, welcome to another blog post. As the title suggests, we’re going to delve into building a Windows Driver. I want to make a quick disclaimer that there are multiple blog posts, videos, and resources for getting started with Windows Driver Development. This post just represents my take on the process, updated for 2023/2024 — and <em>hopefully</em> a spring board into more advance topics down the road. I’ve recently transitioned from Full Stack Development to Windows Kernel Engineering, and this blog series will serve as a guide for that learning journey. The field of kernel development is ‘quite niche’, so if you find this post helpful, I’m glad to be of assistance!</p><h3>Prerequisites</h3><p>If you hope to follow along with this article, we will need to set up a ‘<strong><em>virtual development lab.</em></strong>’</p><blockquote>A ‘virtual development lab’ is a requirement for kernel development. Why? Well, due to the nature of the Operating Systems Kernel, a logical/runtime error in our code will almost certainly <strong>result in a blue-screen-of-death (BSOD).</strong> Additionally, having a virtual computer also allows us to set breakpoints and effectively debug the driver.</blockquote><p><em>LeTs StArt CoOkiNg</em>, these will be our ingredients:</p><ul><li>A 64bit CPU architecture</li><li><a href="https://visualstudio.microsoft.com/vs/community/">Visual Studio Community Edition</a></li><li><a href="https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/">Windows Software Development Kit</a> (Windows SDK)</li><li><a href="https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk">Windows Driver Kit</a> (Windows WDK)</li><li>Virtualization software (I’ll be using <a href="https://www.virtualbox.org/">VirtualBox</a>)</li><li><a href="https://www.microsoft.com/software-download/windows11">Windows 11 ISO</a></li><li><a href="https://www.osronline.com/article.cfm%5Earticle=157.htm">OSRLoader</a></li></ul><h3>Lab Setup</h3><p>Our lab will consist of two virtual machines. <strong>A Development Machine</strong> and <strong>A Testing Machine</strong>. Theoretically, you could get away with having ‘only a testing machine’ — but by having a dedicated development machine, we’ll be able to remotely debug over a virtual network. Below Are Screenshots of my Virtual Machine Configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*ewyXm0JMZX13-enyJom1ow.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*fT3FgsUkq4mICwuRBWNp8g.png" /></figure><h3>Lab Networking</h3><p>After you successfully get two virtual machines up and running, configure a NAT Network for the machines to talk to each other over. In Virtual box this can be done by through the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*aft9Ff1E8gFe3Idk-n778w.png" /><figcaption>Create A NAT Network</figcaption></figure><ol><li>Create a new NAT Network</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*cMeMJfj9cOcv7o3uqrDIGQ.png" /><figcaption>Configure Individual VM network cards</figcaption></figure><ol><li>Attach both the Developer and Testing machine’s network interface to the created NAT Network.</li><li>Use the ipconfig /all command in cmd.exe to record your machine IP addresses. My configuration was as follows:</li></ol><ul><li>NAT Network subnet: 10.0.2.0/24</li><li><strong>Developer Machine IP:</strong> 10.0.2.15</li><li><strong>Testing Machine IP:</strong> 10.0.2.4</li></ul><p>3. Verify your machines can ping each other.</p><pre>C:\Users\starcoding&gt;ping 10.0.2.4<br><br>Pinging 10.0.2.4 with 32 bytes of data:<br>Reply from 10.0.2.4: bytes=32 time=1ms TTL=128<br>Reply from 10.0.2.4: bytes=32 time=1ms TTL=128<br>Reply from 10.0.2.4: bytes=32 time=2ms TTL=128<br>Reply from 10.0.2.4: bytes=32 time=2ms TTL=128<br><br>Ping statistics for 10.0.2.4:<br>    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),<br>Approximate round trip times in milli-seconds:<br>    Minimum = 1ms, Maximum = 2ms, Average = 1ms<br><br>C:\Users\starcoding&gt;</pre><h3>Developer Machine Setup</h3><p>Nice! We now have some machines that can communicate with one another. Phew, yes… one of the most tedious parts about the Driver Development Process is how long it can take to get a lab successfully configured. With this, we will now install the software required to commence development! Recall from the prerequisite section the following:</p><ul><li><a href="https://visualstudio.microsoft.com/vs/community/">Visual Studio Community Edition</a></li><li><a href="https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/">Windows Software Development Kit</a> (Windows SDK)</li><li><a href="https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk">Windows Driver Kit</a> (Windows WDK)</li></ul><p>Within the Visual Studio Installer, Install Desktop Development with C++ and the Individual Components:</p><ul><li>MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest)</li><li>MSVC v143 - VS 2022 C++ x64/x86 Spectre-mitigated libs (Latest)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aqPOjK7Gp1by3WplLJQ93A.png" /></figure><blockquote>For those curious MSVC stands for ‘Microsoft Visual C++’. It comes with a suite of tools for compiling and developing C and C++ code on Windows Machines. It includes with a compiler cl.exe , a linker link.exe , a debugger, an automation build tool nmake and much more!</blockquote><h3>Testing Machine Setup (IMPORTANT!)</h3><p><strong>Boot Configuration Data</strong></p><p>For the test machine, we’ll need to open up an administrative command prompt and make some changes to the ‘<strong>Boot Configuration Data (BCD)</strong>’. To do this, open an administrative command prompt cmd.exe and type these commands:</p><pre>bcdedit /debug on<br>bcdedit /set testsigning onbash</pre><p>As the command text suggests, this will <strong>enable kernel debugging</strong> and <strong>enable test-signing</strong> for our Windows machine! Microsoft is notorious for having strict driver security (<em>understandably so)</em> and requires a driver to have a signed-digital signature before allowing it to be executed.</p><blockquote>The practice of digitally signing drivers is part of Microsoft’s strategy to mitigate risks associated with third-party software and to protect the overall integrity of the Windows Operating System.</blockquote><p><a href="https://www.osronline.com/article.cfm%5Earticle=157.htm">Install OSRLoader</a></p><p>OSR (Open System Resources) is a consulting company known for providing resources, information, and tools related to the Windows Kernel. As per the company website, “This GUI-based tool will make all the appropriate registry entries for your driver, and even allow you to start your driver without rebooting.” Which is perfect for us in the development stage of our driver.</p><h3>Coding Time!</h3><p>Still reading? Good! Yeah — let’s do what we came here to do, develop a driver! With all that setup stuff out of the way, lets open up Visual Studio 2022 on our development machine.</p><p>Lets create a Empty Kernel Mode Driver (<strong>KMDF Project</strong>), I’ll be naming my project kernalChronicles_1 but feel free to give it a name of your own.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/1*ZAXcIGC2LX1I_zsdslV8ow.png" /></figure><p>Then, lets create a Source File called Driver.c (You can select a C++ file type in the selection menu, just give it a .c extension.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*0NqZ3sJEMIHimyHAYzgNEA.png" /></figure><p>All drivers require a <a href="https://learn.microsoft.com/en-us/windows-hardware/drivers/wdf/driverentry-for-kmdf-drivers">DriverEntry</a> routine, which is responsible for the driver’s initialization. This is similar to the main function in standard C programs.</p><p>This is what our DriverEntry routine will look like:</p><pre>#include &lt;ntddk.h&gt;                  // Kernel header<br><br>NTSTATUS DriverEntry(_In_ PDRIVER_OBJECT driverObject, _In_ PUNICODE_STRING registryPath) {<br>    KdPrint((&quot;Hello World - I&#39;m the DriverEntry Routine!\n&quot;));  <br>    //  - prints data when build settings are set to &#39;Debug&#39;,<br>    //    otherwise doesn&#39;t do anything<br>    return STATUS_SUCCESS;<br>}</pre><p>Great! Our Driver should now theoretically load into the kernel! However, it’s important to note a key aspect of the lifecycle of a Windows Kernel Driver:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c91jVVq8NjhBIgDHuT5WSw.png" /><figcaption>Windows Driver Lifecycle</figcaption></figure><p>In many cases, drivers function as ‘event-listeners’ and don’t terminate automatically. Drivers require manual unloading. Upon unloading, an ‘exit’ or ‘unload’ routine is invoked to free resources and prevent memory leaks. So lets make a DriverUnload routine.</p><pre>#include &lt;ntddk.h&gt;<br><br>// Our Unload Routine<br>NTSTATUS DriverUnload(_In_ PDRIVER_OBJECT driverObject) {<br>    KdPrint((&quot;Till Next Time! Goodbye!\n&quot;));<br>    return STATUS_SUCCESS;<br>}<br><br>// Our Entry Routine<br>NTSTATUS DriverEntry(_In_ PDRIVER_OBJECT driverObject, _In_ PUNICODE_STRING registryPath) {<br>    KdPrint((&quot;Hello World - I&#39;m the DriverEntry Routine!\n&quot;));  <br>    //  - prints data when build settings are set to &#39;Debug&#39;,<br>    //    otherwise doesn&#39;t do anything<br><br>    driverObject-&gt;DriverUnload = DriverUnload; // Set the unload function to DriverUnload<br>    return STATUS_SUCCESS;<br>}</pre><p>Let’s build our solution and see what happens…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rr3zCkiPsaw9tOcggz--Mw.png" /><figcaption>Build Errors</figcaption></figure><p>Oop ;-; what’s that? Dang, an error — wait.. no that’s just a warning? What gives?</p><p>Because the kernel is critical to operating System functionality — <strong>KMDF projects are configured to always treat warnings as errors</strong>. While it is possible to disable this behavior, it is NOT recommended. Instead, we can use the macro UNREFERENCED_PARAMETER(&lt;object not referenced&gt;) to tell the compiler we are aware of this unused variable.</p><p><strong>Our final solution looks as the following:</strong></p><pre>#include &lt;ntddk.h&gt;<br><br>// Our Unload Routine<br>NTSTATUS DriverUnload(_In_ PDRIVER_OBJECT driverObject) {<br>    UNREFERENCED_PARAMETER(driverObject);<br>    KdPrint((&quot;Till Next Time! Goodbye!\n&quot;));<br>    return STATUS_SUCCESS;<br>}<br><br>// Our Entry Routine<br>NTSTATUS DriverEntry(_In_ PDRIVER_OBJECT driverObject, _In_ PUNICODE_STRING registryPath) {<br>    UNREFERENCED_PARAMETER(registryPath);    <br>    KdPrint((&quot;Hello World - I&#39;m the DriverEntry Routine!\n&quot;));  <br>    //  - prints data when build settings are set to &#39;Debug&#39;,<br>    //    otherwise doesn&#39;t do anything<br><br>    driverObject-&gt;DriverUnload = DriverUnload; // Set the unload function to DriverUnload<br>    return STATUS_SUCCESS;<br>}</pre><p>And now when we build the solution, we get a success message!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5kiBy9LMcMJHl6i6-YV_mQ.png" /><figcaption>Successful Build</figcaption></figure><p>We can now navigate to the build path location (mine was the default location) and copy + paste it onto our test machine! Make sure to Build the Solution with Debug + x64 settings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*iQwd8kRgKgaJC2mGySDekQ.png" /></figure><h3>Loading the Driver</h3><p>Now that we have the Driver on our test machine, lets open up OSRLoader and do the following on the home page:</p><ol><li>Change the Driverpath to our *.sys driver</li><li>Click the Register Service button (this is only required for the first time you attempt to run the driver)</li><li>Start the Service!</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/443/1*l4dK3Fm2Zynd9kfL7wlJUw.png" /></figure><p>Hmm… You’ll notice after pressing the ‘Start Service’ button all we get is the following &#39;operation completed successfully&#39; popup. Cool! But I mean... what if we <strong>actually want to view what our code is doing and see the debug messages printed</strong> to a console of sorts? For that, we&#39;ll have to enable <strong><em>Kernel Debugging.</em></strong></p><h3>Kernel Debugging</h3><p>To enable kernel debugging, type in the following command on your Windows Testing Machine:</p><pre>bcdedit /dbgsettings net hostip:&lt;Developer Machine IP Address&gt; port:50000<br><br>(example)<br>bcdedit /dbgsettings net hostip:10.0.2.4 port:50000</pre><p>This command will allow our developer machine to remotely debug the kernel. Copy the key generated — we will use this later:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*SC0v8B0rTBnPgwGFlAKkig.png" /></figure><h4><strong>Turn off the firewall</strong></h4><p>We will also need to turn off the firewall to prevent any network issues that could arise.</p><pre>netsh advfirewall set allprofiles state off</pre><h4><strong>Windbg</strong></h4><p>On the development machine, navigate to C:\Program Files (x86)\Windows Kits\10\Debuggers\x64 , launch windbg.exe , and Select the File &gt; Kernel Debug... option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/1*C5rJDz5MWfLuO_uTMx9M3g.png" /></figure><p>On the screen prompted, Configure a NET Kernel Debug connection with the port + key we received from the testing machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/399/1*2gdg46RpzZSROt5pKNtGDw.png" /></figure><p>Upon a successful connection, you should get the following! (<em>Note, I originally had problems getting mine to successfully connect. Play around and possibly restart the testing machine if issues arise. Some Common scenarios are:</em></p><ul><li><em>Ensure your developer IP address was correct</em></li><li><em>Ensure that you built the project with</em> Debug + x64 settings</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/1*jRukJI842y6q_JTkZBfikg.png" /></figure><p>When we ‘Start’ our driver within OSR Loader, we’ll now see debug messages. Take note of the two screenshots and their corresponding outputs within windbg!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Byp8hB58RhXYccmTTOyuvA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vQqtyiHj8N3f41mYteZTRQ.png" /></figure><h3>Conclusion</h3><p>We made it to the end folks. For the most part, the heavy lifting of this blog post was creating a virtual lab environment with the correct software + networking requirements. With this setup now accomplished we’ll be able to more interesting kernel programming projects, (<em>for example, log to a file every time a file is opened on the system… and by who!)</em> I hope this post also introduced you to <strong>KMDF Projects</strong> and <strong>Windbg</strong>! We will absolutely be exploring these technologies in further detail in the next post. Till then, cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bed1eaf7ad4e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From the Developer’s Desk: All Things Open 2023 Conference Recap]]></title>
            <link>https://jakemellichamp.medium.com/from-the-developers-desk-all-things-open-2023-conference-recap-c1ece1edcaeb?source=rss-5e3f5b66bfb1------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1ece1edcaeb</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[community]]></category>
            <category><![CDATA[infosec]]></category>
            <dc:creator><![CDATA[Jake Mellichamp]]></dc:creator>
            <pubDate>Mon, 23 Oct 2023 18:31:05 GMT</pubDate>
            <atom:updated>2023-10-23T18:31:05.772Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>“Networking is simply investing in your community. It’s the genuine act of showing up”</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jRZ1LYnDE7te-LDzONfISw.png" /><figcaption>All Things Open 2023 Promotional Image</figcaption></figure><h4>Preface</h4><p>After a year of remote work, the prospect of attending an in-person Computer Science event in late 2023 was nothing short of exhilarating. Making connections in Computer Science post-college can be challenging, and this conference offered the ideal environment for networking and forming lasting relationships. I couldn’t have been happier with the people I had the pleasure of meeting.</p><h4>Intro</h4><p>From the <a href="https://2023.allthingsopen.org/">All Things Open</a> website, the event can be summarized as “A Technology Conference focusing on the tools, processes, and people making open source possible.” That goal was definitely met — I mean — look at this Program Guide for <a href="https://2023.allthingsopen.org/wp-content/uploads/2023/10/10.16.23.ATO_Schedule_Monday_10.13.23.pdf">Day 2 of the conference</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t0_czTkS9JBjj1tIp66P3g.png" /><figcaption>A Picture of the AoT Program</figcaption></figure><p>There were dedicated tracks for Software, DevOps, Security, Network, Linux, Cloud, and Database Engineers — just to name a few. So sit down, take a sip of coffee and lets summarize some of my favorite talks of the day:</p><p><strong>How to Estimate Your Stories — Sr. Agile Scrum Master @ Discover</strong></p><p>As I advance in my career I find that it has become increasingly important to be able to identity ‘how long should this task take?’ When it comes to delivering software to customers, there are deadlines and accurately estimating the time to completion is key — this was my first talk attended!</p><ul><li>Estimate stories relatively based on ‘technical difficulty’ not based on ‘how long you think this will take’. This is called <strong>Relative Estimation</strong></li><li>Agile teams should come together to point a story, someone’s ‘5’ might be someones ‘2’. Having a Diverse skill set amongst team members can be huge for this.</li><li>Find a reference point. ‘What does 1 story point mean?’ How does the team collectively define ‘1’. Build your estimations around that.</li><li>Commit to Outcome! To help your product owners and upper leadership with metrics, only give User Stories points! Bugs do not ‘add value’ to the overall product, therefore should we really point them? If scrum teams opt-in to only pointing Stories, this will allow leadership teams to see at a high-level how fast the product is maturing vs how much time is spent putting out fires.</li><li>Never ‘re-point’ a story mid sprint, Sprint retrospect should be a place where people call out their incorrect estimations… for better or worse!</li></ul><p><strong>Day Three Keynote Speech</strong></p><ul><li>“<em>Failure is not always a mistake, it might be the best choice under the circumstances</em>”</li><li>Surveyed developers reported +55% in quickness and +75% Usefulness rating using GitHub-Copilot as of Summer 2023</li><li>Spend 15 minutes a week reflecting on your career and what you want out of it.</li><li>Networking is simply investing in your community. It’s the genuine act of showing up. That’s all.</li></ul><p><strong>How to Make Your Software Terrible to Package — Dev @ Amazon</strong></p><ul><li>Protip, first name your project before starting (and maybe check for trademarks)!</li><li>Warning: Try to never hardcode compiler flags — make your compile flags easy to modify. This will help developers on other systems build your solution.</li><li>Dependency Bundling: Ask yourself how much do you really need a dependency before committing to it!</li><li>Version your Github Projects. This will make consumers easily know which ‘commits’ are official builds.</li><li>Don’t make square wheels, if an Open Source Solution already exist with the project you have in mind — fork from it and enhance it instead of building your own solution from scratch</li></ul><p><strong>Ensure API Security with Contract Testing — Architect @ Postman</strong></p><ul><li>Build your APIs to the OpenAPI standard, this will allow applications like <a href="https://www.postman.com/">Postman</a> to automatically test and ensure your api works before hosted in production.</li><li>Shift Left with your strategies of security as much as possible. When Designing an API that will retain or consume data — think of the following concepts.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*ZkbZBpIBhGBDEw8YZT1VDw.png" /><figcaption>ibm definition of Data Governance.</figcaption></figure><p><strong>Project Sputnik — Developer Lead @ Dell</strong></p><p><em>This talk was about what it takes to lead an internal project at a company.</em></p><ul><li>Put together a team of respectable pears to work part-time with you on the vision and project.</li><li>“You’re good enough” — You’ll never know it all, and that’s okay. We’re software engineers. It’s our job to solve puzzles on the fly.</li><li>It helps tremendously to have someone in leadership believe in your abilities to deliver or at least understand the importance of your project. (It might not have a ROI for a substantial time).</li><li>A Great Idea without execution is nothing (Walk the Talk).</li><li>Empower your team to feel passionate about your project idea. (Invest in swag, have a catchy name or motto)!</li></ul><h3>Conclusion</h3><p>This of course was a brief summary of my favorite talks and insights talked about at <em>All Things Open 2023.</em> There were many technical talks on javascript and Security Engineering — but I’ll save those for individual breakdowns.</p><p>It’s easy to blog about the takeaways of talks given, but probably the most valuable part of attending this event was simply the socializing aspect. When you have 4,000+ developers in the same location for 72 hours, there are many conversations to be had. Be weird, say some hot takes, or just mention your technical stack that you primarily work with — and bOoOm — you’ll be wrapped into a conversation for the next 30 minutes and come out with a new friend.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*PAsvUoApOGAhLA5vMwOxGA.png" /><figcaption>All Things Open 2023 Logo.</figcaption></figure><p>If you’re apart of the tech community in the Southeast USA, mark your calendars for October 27–29th in 2024 for next year’s <em>All Things Open</em> event!</p><p>Shoot me a DM on twitter if you’re in the North Carolina area or hoping to learn more about<strong> All Things Open</strong>: <a href="https://twitter.com/JakeMellichamp">https://twitter.com/JakeMellichamp</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1ece1edcaeb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating an Instagram Posting Bot.]]></title>
            <link>https://medium.com/codex/creating-an-instagram-posting-bot-7b7a6c1ac34a?source=rss-5e3f5b66bfb1------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b7a6c1ac34a</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[passive-income]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[instagram]]></category>
            <dc:creator><![CDATA[Jake Mellichamp]]></dc:creator>
            <pubDate>Fri, 21 Oct 2022 13:55:33 GMT</pubDate>
            <atom:updated>2022-10-21T14:37:53.311Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3WmT4Mv6cdnhzMF3Q08hFw.png" /><figcaption>Lets talk about how to make an Instagram Bot</figcaption></figure><h3>Abstract</h3><p>Instagram is one of the most popular social media platforms around today. As a fellow user myself, I use it fairly often, but in different way. My primary reason for opening Instagram isn’t to see my acquaintance’s most recent vacation to Mexico or laughing at memes (which valid, is also fun) — but is instead to consume ‘inspirational content’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*p1hDJkDYTNQe5mY6sdgWww.png" /><figcaption>An example of an ‘Inspirational Content’ account.</figcaption></figure><p>A lot of these pages have 100k + followings, and post… quotes from famous individuals… It got me thinking, “Hmmm, instead of scrolling down consuming someone’s idols, I should make one myself!”</p><p>So the quest was on — I was going to create an Instagram Bot that could automatically post a quote a day from people who I personally take inspiration from!</p><h4>A Quick Note</h4><p>If you’re here because you want to do this yourself, simply scroll to the bottom! There’s a link to the open source code on <a href="https://github.com/Jacob-Mellichamp/Instagram-bot">Github</a>, and I’ll also outline how to setup the repo to work for you personally!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F0SBF-fQUqgo%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D0SBF-fQUqgo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F0SBF-fQUqgo%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/cf6cb65b315757edae9877050d26b68b/href">https://medium.com/media/cf6cb65b315757edae9877050d26b68b/href</a></iframe><h4>Where to Begin</h4><p>As software engineers, it’s in our DNA to break problems up into smaller ones. The ultimate goal is to create an Instagram account that can post random quotes automatically, with that criteria we need to build a software application that can:</p><ol><li>Get a Random Quote from a predefined list of People.</li><li>Generate an Image that combines a picture of the author with the quote</li><li>Post the generated picture to Instagram</li></ol><p>If we follow the principle of ‘Separation of Concerns’ we can also create a organized code base that accomplishes each one of these objectives. Let’s dive in!</p><h4>I. Random Quote Selection</h4><p>The process of selecting a random quote can be done many ways. We are starting with a predefined list of authors, so the first algorithm that came to mind was:</p><ol><li>Select a random author (literally just a random string within a list of strings)</li><li>Select a random Quote from the selected author. (Again, just selecting a random string within a list of strings)</li></ol><p>Pretty straightforward right? The list of authors is hardcoded into the application, but the list of quotes are generated at runtime by pulling quotes from the website <a href="https://goodreads.com/">www.goodreads.com</a> using the Python library <a href="https://beautiful-soup-4.readthedocs.io/en/latest/">beautifulsoup</a>. This allows the end-user to easily add additional authors to the hardcoded list without having to manually go searching for cool quotes by said author.</p><p><strong>Optimization through Caching: </strong>The code will also ‘cache’ the quotes obtained from the <a href="http://www.goodreads.com/">www.goodreads.com</a> website in a text file so that ‘re-fetching’ quotes from the website is unnecessary.</p><h4>II. Image Generation</h4><p>If this bot was made for twitter, having the Author and Quote would be the only thing we need. However, because this is Instagram, we have to post a photo. This means we need to morph our random quote onto an image before we are ready to post.</p><p><strong>Instagram requires that photos be a certain dimension at the time of post:</strong></p><ul><li>1:1 Ratio Images (1080 x 1080 pixels)</li><li>4:5 Ratio Images(1080 x 1350 pixels)</li></ul><p>I won’t lie, I was struggling to consistently find images of authors at this size. This struggle led me to the decision that I would simply manually add photos to the application directly. Using my photo editing software of choice, Adobe Photoshop, I was able to create photos using the dimensions described and add them to the software application. Once these Images were saved to the application, the python library ‘<a href="https://pillow.readthedocs.io/en/stable/">Pillow</a>’ (Python Image Library) was used to modify the image and write text onto the image before resaving.</p><p>The main photo edits that needed to be performed were the following:</p><ul><li>Lower the Contrast of the Image by 50% (That way the photo text would ‘pop’)</li><li>Center a arbitrary length string onto the center of the photo.</li></ul><h3>III. Posting to Instagram</h3><p>Now the part we’ve all been waiting for, actually posting to Instagram. There does exist an official <a href="https://developers.facebook.com/docs/instagram-api/">Instagram API </a>for developers to interact with various endpoints. When it comes to personal programming projects, I hesitate to re-invent the wheel when I don’t have too. Therefore I utilized the <a href="https://pypi.org/project/instabot/">instabot</a> python wrapper for interacting with Instagram. Instead of having to manually create/configure requests, we can call the wrapper functions to do this for us! With an astonishing 12 lines of code in our application we can post to instagram!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*R3DJgLiwP--04B-HxknFRA.png" /><figcaption>Code used to publish to instagram</figcaption></figure><p>Hats off to <a href="https://github.com/ohld">Daniil Okhlopkov</a> for making a very intuitive library!</p><h3>Conclusion</h3><p>So there you have it folks! After coming up with an initial project idea and breaking it down into smaller sub-problems — we were successfully able to create a Instagram Posting Bot! The main takeaway from this post is by breaking a problem into sub-problems or ‘individual challenges’ I was able to create a concise code base that is easy to configure and modify. I hope this code breakdown was easy to understand. Feel free to clone the repository and try it out yourself!</p><p>Github Link: <a href="https://github.com/Jacob-Mellichamp/Instagram-bot">https://github.com/Jacob-Mellichamp/Instagram-bot</a></p><p>Follow me on Twitter: <a href="https://twitter.com/JakeMellichamp">https://twitter.com/JakeMellichamp</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b7a6c1ac34a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codex/creating-an-instagram-posting-bot-7b7a6c1ac34a">Creating an Instagram Posting Bot.</a> was originally published in <a href="https://medium.com/codex">CodeX</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Buffer Overflows, Shellcode, and Memory Corruption]]></title>
            <link>https://medium.com/codex/buffer-overflows-shellcode-and-memory-corruption-51f546ab00ab?source=rss-5e3f5b66bfb1------2</link>
            <guid isPermaLink="false">https://medium.com/p/51f546ab00ab</guid>
            <category><![CDATA[c-programming]]></category>
            <category><![CDATA[shellcode]]></category>
            <category><![CDATA[reverse-engineering]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Jake Mellichamp]]></dc:creator>
            <pubDate>Mon, 08 Aug 2022 21:01:51 GMT</pubDate>
            <atom:updated>2022-08-09T11:36:01.863Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5B5Ji_M0xQw8iT-6c9ixdA.png" /><figcaption>Contributors: <a href="https://www.linkedin.com/in/jake-mellichamp/">Jake Mellichamp</a>, <a href="https://www.linkedin.com/in/zackary-griffin/">Steven Griffin</a>, <a href="https://www.linkedin.com/in/wes-b-34216817/">Wes Bailey</a></figcaption></figure><h3>I. Introduction</h3><p>Buffer overflows and memory corruption exploits are one of the earliest of computer security issues, and the subject has accounted for countless hours of effort from both the attack and defense perspectives.</p><p>The first description of a buffer overflow attack is recorded in the 142 page, 1972 USAF publication <em>‘Computer Security Technology Planning Study</em>’.[1] In section 3.2, titled ‘The Malicious User Threat’, the document asserts:<em>“The fact that</em><strong><em> operating systems were not designed to be secure</em></strong><em> provides a malicious user with any number of opportunities to subvert the operating system itself”.</em></p><p>The report goes on to discuss a vulnerable program that handled pointers, noting that:<em>“</em><strong><em>By supplying addresses outside the space allocated</em></strong><em> to the users programs, </em><strong><em>it is often possible to get the monitor to obtain unauthorized data</em></strong><em> for that user, or at the very least…</em> [cause]<em> a system crash.”</em></p><p>A more succinct and canonical description of a buffer overflow attack would be difficult to find. <strong>Clearly, the focus in the early days was on making systems <em>work</em>, not making systems <em>secure</em>.</strong> That would change.</p><p>While most of the early exploits can only be reproduced on a modern OS by explicitly disarming the default countermeasures, it’s still instructive to learn something about the history of these attacks. Nothing within the realm of cyber security has been created in a vacuum, and it’s often the case that methods of modern systems that seem arbitrary are rooted directly to something in the past. Understanding the history can shed greater light and understanding on the what’s and why’s of current platforms and their vulnerabilities.</p><h3>II. Historical Perspective</h3><p>In the fall of 1988, a graduate student at Cornell University named Robert Tappan Morris wrote a bit of malicious code that became notorious as the “<strong>Morris Worm</strong>”. [2] It exploited several weaknesses in Unix architecture including a buffer overflow in the ‘fingerd’ network service. The worm spread rapidly through machines connected to the nascent internet and caused serious disruptions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/195/0*-FGIZTRtICxs-wnu" /><figcaption>Robert Tappan Morris</figcaption></figure><p>Morris insisted that he was merely, “demonstrating the inadequacies of current security measures on computer networks by exploiting the security defects he had discovered.” His justification fell on deaf ears, and Morris became the first person to be indicted under the “Computer Fraud and Abuse Act”. He was later convicted and sentenced to 3 years probation and a $10,500 fine. He was able to rebound rather well though, later completing his Ph.D. at Harvard and co-founding several tech companies including the highly successful incubator<em> </em><a href="https://www.ycombinator.com/"><strong>YCombinator</strong></a>. His current estimated net worth is $4.9 billion dollars.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KqmcqxUig_rtvLr5tauu4w.png" /><figcaption>History of the BufferOverflow visualized</figcaption></figure><p>A lot of work has been done to address this type of vulnerability over the last three decades. In 1997, StackGuard was announced, implementing the concept of a<strong> </strong><a href="https://en.wikipedia.org/wiki/Stack_buffer_overflow#Stack_canaries"><strong>Stack Canary</strong></a>. The same year, a hacker going by the name ‘Solar Designer’ demonstrated the<a href="https://en.wikipedia.org/wiki/Return-to-libc_attack"><strong> return-2-libc attack</strong></a>, effectively bypassing non-executable stack countermeasures. With this discovery, heap overflows, pointer overwrites, format string attacks, and a host of other fiendishly creative exploits were developed.[3] Simultaneously, defensive measures were continually bolstered in such forms as <a href="https://en.wikipedia.org/wiki/Address_space_layout_randomization"><strong>ASLR</strong></a>, <strong>StackGhost</strong>, <strong>PaX</strong>, and more. No matter what one side does, the other seems just ahead or on their heels; the cat and mouse game never ends.[4]</p><h3>III. Stack Buffer Overflow Concepts</h3><p>With that being said, in our experiments, we will become the cat (attackers) that catches the mouse (modern stack protections). Here outlines the context of what a stack buffer overflow is: <strong>Stack buffer overflows (SBOF) have been a fundamental exploit in ELF binaries for much of history.</strong> <strong>A successful attacker can overwrite local variable data or execute malicious code.</strong> This is obviously not ideal, and is usually caused by a programmer’s unawareness of <a href="https://www.geeksforgeeks.org/stack-frame-in-computer-organization/">how stack frames work</a>.</p><p>The process of compiling source code into an executable binary is a complex process. The source code must be preprocessed, assembled, and linked to library functions (with a linker) before finally loaded into memory (with a loader). <strong>When this process is complete a text, data, heap, and stack segmentation are loaded into memory and used for program execution.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/0*ZUSL41YQJmc63AoS" /><figcaption>Figure 3.1 — Program Layout.</figcaption></figure><p>The program layout will be handy in understanding the nature of SBOF attacks, but the real <strong>vulnerability lies inside the stack frame</strong>.</p><p>A stack frame is segment of memory that is created every time a function call is made. It contains the <strong><em>base-frame pointer</em></strong> (EBP/RBP — a constant address marking the base of the stack), the<strong> <em>stack pointer</em></strong> (ESP/RSP — which may change during the execution of a function as values are pushed or popped off the stack), a <strong><em>return address </em></strong>(EIP), and incoming <strong>function parameters</strong>. The stack buffer overflow vulnerability can be described below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/535/0*_6Cbgn6uCu2qNP7Z" /><figcaption>Figure 1.2 the Vulnerability.</figcaption></figure><p>In order to exploit this situation, the attacker must overflow the buffer’s memory with a combination of NOP commands and Shellcode. The overflow should continue until the base-frame-pointer, EBP, is successfully overwritten. <strong>The final step of the exploit is to overwrite the<em> return address of the stack</em> back into the buffer, before the start of the shellcode. If these conditions can be met, then the binary in question is a liability.</strong></p><h3>IV. Exploit Demonstration on Linux 32-bit x86 system</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*JKmvkmB1w_GZY75ofFcBlA.png" /><figcaption>Figure 4.1 — vulnerable program</figcaption></figure><p>In our SBOF exploit, our <strong>buffer for input is 500 bytes in size</strong>. To start off, we have to discover:</p><ul><li>The distance from the <strong>start of the buffer</strong> to the <strong>return address</strong> so we can place a malicious return address in the EIP register.</li></ul><p>To do this, our team used<strong> GDB</strong>. We started by randomly selecting a small overflow of the buffer, in this case, 8 bytes over the buffer (Figure 4.2).</p><p>A segfault occurs! By using the command (gdb) info registers a user can see what registers have been affected. As we can see from the image below, we successfully overwrote the EBP register but not the EIP. The EIP is the return address. From Figure 4.1, we also know the EIP is always 4 bytes past the EBP register. So we simply need to add 4 to the original number of 508 making it 512.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iu8U6XZQS2R2LtaJOLyBSQ.png" /><figcaption>4.2 Stack Overflow</figcaption></figure><h4>Successfully Overwriting the Return Address</h4><p>Launching the program with a 512 ‘A’ characters results in the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*iu1Eugc_kYd_2k9mYnpLSw.png" /><figcaption>4.3 Successful Overwrite of the return address</figcaption></figure><h4>Crafting a Malicious Payload</h4><p>Using <a href="https://www.geeksforgeeks.org/gdb-step-by-step-introduction/">GDB </a>we discovered that the distance between the end of the buffer and the EIP register is exactly 12 bytes. Knowing this information, we can craft a malicious payload. So, Where to begin?</p><ul><li><strong>Shellcode</strong>: Using <a href="https://shell-storm.org/">https://shell-storm.org/</a> our team was able to find a snippet of shellcode to execute the System call execve(/bin/sh) using 43 bytes. This shellcode will launch a terminal with the current processes permissions.</li><li><strong>Return Address: </strong>We need to overwrite the EIP register to point to our shellcode. Using the<a href="https://visualgdb.com/gdbreference/commands/x"> command</a> (gdb) x/200wx $esp-550 we are able to read the virtual memory addresses 200 bytes near the stack base. We’ll upload the shellcode somewhere in the overflowed stack <em>(It doesn’t have to be an exact value, just somewhere within the stack</em>), and use the <strong><em>Return address to point to the start of the shellcode.</em></strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/619/1*d30hRIzLM4xiBun5rMgTkw.png" /><figcaption>Figure 4.4 — Possible Return Address Locations</figcaption></figure><ul><li><strong>NOP Slide: </strong>The payload needs to be 512 bytes long (Figure 4.3). We have Shellcode (43 bytes) and a return address (40 bytes<em>, The reason the return address is 40 bytes is to create a sort of buffer space to ensure a greater chance of success that it lands on our correct return address even if some things move slightly around in memory). </em>After doing some quick math (512–40–43 = 429) we know that we need to fill the rest of the 429 bytes of buffer data with NOP Commands.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*V3ISjgbW_K_sPat24d0KkA.png" /><figcaption>Figure 4.5 — Malicious Payload</figcaption></figure><h4>Executing the Code</h4><p>Once the python script has been created, we run the ELF binary as any typical user would, except our buffer input is a combination of NOPs, Shellcode, and Return addresses. After execution, you should have a shell/terminal open and ready to use!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/569/1*0QT9GSXags6nSnuPtCcu3Q.png" /><figcaption>Figure 4.6 — Successful PWN</figcaption></figure><h3>V. Advanced Exploits</h3><p>While this is an enlightening and instructive exercise, the fact is that this attack is not possible without at least partially disarming countermeasures in the operating system and/or the compiler. The <strong>non-executable stack feature (DEP)</strong> is a hardware-based safety feature that will prevent the malicious code from executing. The <strong>StackGuard </strong>feature implements a stack canary that will also halt execution if overwritten by this simple overflow attack. Address space layout randomization can be defeated with brute force in a 32 bit machine due to the comparatively small available address space. 64 bit machines are practically invulnerable to brute force vs. <strong>ASLR</strong>, but technically still not immune.</p><h3>VI. Conclusion</h3><p>Stack Overflow exploits have been around for a very long time, they remain a present and viable threat vector. Despite over three decades of operating system and compiler engineering, these vulnerabilities have not been completely mitigated. This begs the question, <strong>can buffer overflows ever be fully ‘engineered out’ of software?</strong></p><p>The Open Web Application Security Project (OWASP), a non-profit organization working to improve software security, provides educational content relevant to the topic. Its online whitepaper on Buffer Overflow states that:</p><p><em>“part of the problem is due to the wide variety of ways buffer overflows can occur, and part is due to the error-prone techniques often used to prevent them.”</em></p><p><strong>The paper also notes that some languages like C, C++, Fortran, and Assembly, are more susceptible to overflows than others</strong>. Interpreted languages are much safer, if not altogether immune to the technique. And all operating systems are vulnerable to some extent.[5]</p><p>It seems that the best defense is a well planned and vigilant ‘defense-in-depth’, <strong>addressing software design</strong> and build best practices at all phases and <strong>maintaining up-to-date OS patches</strong> needed to address current vulnerabilities as they are identified.</p><p><em>Final Note: This article would not have been possible without the incredible collaboration of my colleagues: Steven Griffin and Wes Bailey.</em></p><p><em>Stay tuned… we will be attempting to conduct a Modern Stack Overflow exploit without safeguards shortly.</em></p><h3>VII. References</h3><p>[1] James P. Anderson. 1972. Computer Security Technology Planning Study. <em>Deputy for Command and Management Systems HQ Electronic Systems Division (AFSC).</em></p><p><a href="https://csrc.nist.gov/csrc/media/publications/conference-paper/1998/10/08/proceedings-of-the-21st-nissc-1998/documents/early-cs-papers/ande72a.pdf">https://csrc.nist.gov/csrc/media/publications/conference-paper/1998/10/08/proceedings-of-the-21st-nissc-1998/documents/early-cs-papers/ande72a.pdf</a></p><p>[2] Wikipedia contributors. Robert Tappan Morris. Wikipedia, The Free Encyclopedia. September 21, 2020, <a href="https://en.wikipedia.org/w/index.php?title=Robert_Tappan_Morris&amp;oldid=979630920.">https://en.wikipedia.org/w/index.php?title=Robert_Tappan_Morris&amp;oldid=979630920.</a> Accessed October 21, 2020.</p><p>[3] Aleph One. Smashing the Stack for Fun and Profit. Underground.org. v7, Issue 49. Nov. 1996. <a href="https://seclists.org/bugtraq/1996/Nov/17">https://seclists.org/bugtraq/1996/Nov/17</a></p><p>[4] Haroon Meer. Memory Corruption Attacks The (almost) Complete History. <em>BlackHat 2010</em></p><p><a href="https://thinkst.com/resources/papers/BlackHat-USA-2010-Meer-History-of-Memory-Corruption-Attacks-wp.pdf">https://thinkst.com/resources/papers/BlackHat-USA-2010-Meer-History-of-Memory-Corruption-Attacks-wp.pdf</a></p><p>[5] Buffer Overflow. OWASP website. Apr 2020. <a href="https://owasp.org/www-community/vulnerabilities/Buffer_Overflow#">https://owasp.org/www-community/vulnerabilities/Buffer_Overflow#</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=51f546ab00ab" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codex/buffer-overflows-shellcode-and-memory-corruption-51f546ab00ab">Buffer Overflows, Shellcode, and Memory Corruption</a> was originally published in <a href="https://medium.com/codex">CodeX</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Teams with Documentation]]></title>
            <link>https://medium.com/codex/documentation-how-to-build-a-team-1d698ced4a36?source=rss-5e3f5b66bfb1------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d698ced4a36</guid>
            <category><![CDATA[team-building]]></category>
            <category><![CDATA[documentation]]></category>
            <category><![CDATA[consulting]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[leadership]]></category>
            <dc:creator><![CDATA[Jake Mellichamp]]></dc:creator>
            <pubDate>Mon, 25 Jul 2022 15:42:21 GMT</pubDate>
            <atom:updated>2022-07-28T01:22:21.175Z</atom:updated>
            <content:encoded><![CDATA[<h4>A Practical Guide To Technical Documentation</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*gKJzNvYVdR1hD86O.jpg" /><figcaption>Building Efficient Teams</figcaption></figure><blockquote>This article looks to outline a set of principles that, if followed, will tie quality documentation into your teams existing workflow to create scalable software, professional products, and efficient Software Engineers.</blockquote><h3>Introduction</h3><p>Software Engineers from across the globe, industries, and disciplines have various job descriptions and workflows — but almost unanimous share a single common pain: a lack of quality documentation. This article looks to outline a set of principles that, if followed, will tie quality documentation into your teams existing workflow to create scalable software, professional products, and efficient Software Engineers.</p><h3>Why Documentation?</h3><p>Fundamentally, project teams are more focused when their design goals are clearly stated. A Software Engineer in consulting for example, is often thrown onto an existing project. No matter the experience of the consultant, there is a learning curve that takes place during this process. When a repository of documentation has been established, the newly on-boarded member can easily digest the existing code-base and thus understand the processes at play.</p><p>Authoring documentation itself is a tedious task to complete. <strong>There is no immediate benefit to writing documentation as the author, so why bother? </strong>Documentation tends to require much up-front effort and doesn’t provide clear benefits until later in the Software Lifecycle. It can be thought of as an investment. Think how long will the project be supported: 1 Year? 5 Years? 10 years? Now think how many times the author of a code feature might have to explain how that feature works over that time. As an author of documentation, we simply write a document once, but over its lifetime it may be read hundreds or thousands of times. Some benefits are as followed:</p><ul><li><strong>It Helps formulate an API</strong>: If you can’t explain it, you probably haven’t designed it optimally.</li><li><strong>It provides a historical record</strong>: With a document, one can easily build off code that was written 1–2 years ago without fear of breaking the application downstream.</li><li><strong>A more professional end product</strong>: A product that has good documentation is usually a good indicator of how well a product will be maintained.</li><li><strong>It will prompt fewer questions</strong>. If you must explain something more than once, it usually makes sense to document that process.</li></ul><h3>Agile’s Myth</h3><p>In the <a href="https://agilemanifesto.org/">Agile Manifesto</a>, one of the core principles is explicitly stated as:</p><blockquote>Working software over Comprehensive Documentation.</blockquote><p>This manifesto has led to interesting interpretations over the years. Some to go as far as documentation is not needed. The original authors clarified that their principle meant “That is, while there is value in the items on<br> the right, we value the items on the left more.” Simply put, its better to ‘do’ rather than to invest time in a overly detailed upfront documentation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/0*tmSBLAJiI_FQdZ2n.jpg" /><figcaption><strong>Figure 1</strong> Agile Lifecyle: (<a href="https://www.techopedia.com/definition/22193/software-development-life-cycle-sdlc">https://www.techopedia.com/definition/22193/software-development-life-cycle-sdlc</a>)</figcaption></figure><p>It is a myth that Agile methodology meant “Documentation is not important”. Agile is a philosophy to make projects more dynamic, because a project will inevitably change requirement scope over a duration of time. There is nothing in the Agile development methodology that inherently prevents us from creating as much documentation as the project requires. Agile suggest that documentation should be “good enough” not that it is a waste of time. <strong>To not waste time, ask the following set of basic questions:</strong></p><ul><li>What is the document needed for?</li><li>Who is the target audience of the document?</li><li>How will the target audience use the documentation? As a Reference? As a Manual?</li><li>How much time will it cost to produce?</li></ul><h3>Documentation As Code</h3><p>When creating software products, a Kan-ban board <em>(Jira anyone?) </em>is used to outline tasks and distribute ownership to developers. This process is a tried-and-true way of optimally producing software. But what about documentation? Who on the team is responsible for producing the documentation in this workflow: Business Analyst, Tech Leads, Managers? Documentation should be treated as code — and thus — produced alongside code by <em>Software Engineers</em>.</p><p>Although Tech Leads and Managers can produce the documentation themselves, this strategy fails to scale well over time if more developers are added onto the project. Business Analysts can scale with the project but may struggle to accurately describe the technical processes that are taking place with each feature change. This leaves the engineers themselves to write documentation.</p><p>Tying back to the original point, Kan-ban boards are used to distribute ownership to tasks being created. <strong>The same distribution of documentation needs to be explicitly stated across developers to keep documents from becoming stale and difficult to maintain</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*oekHPRnFIGKgWfJz24mP7g.png" /><figcaption><strong><em>Figure 2</em></strong><em> Developers distributed document ownership</em></figcaption></figure><p>Clarity in ownership allows developers to incorporate documentation into their existing workflow while simultaneously preventing duplicate documents. Documentation is often so tightly coupled to code that it should be essentially treated as code. Which means it should:</p><ul><li>Have a symmetric structure</li><li>Be placed under source control</li><li>Have clear ownership</li><li>Be periodically evaluated (or tested some way)</li></ul><h3>Industry Pains</h3><p>When projects initially begin, tracking of files is seamless and manageable. Documents are added to a Microsoft Teams folder structure, attached to user stories in Jira, or hosted on other third-party applications. As time goes on, folder structures get more complex. People leave. Documents become obsolete or lost. New developers then join a project, and are never presented these lost documents, or can’t confirm if the documentation being presented to them is outdated or accurate. Before long, sprint burn down charts become increasingly stagnant and sprint goals are missed. <strong>The consequences of a bad repository of documentation leads to an inefficient on-boarding process, repeated conversations between stakeholders, and a ‘one-person-knows-all’ effect.</strong></p><p>Obviously, this doesn’t happen for every project, but it does happen to some. How can this problem be mitigated? By writing documentation in <strong>Markdown (.md)</strong>. Markdown has arrived as the premier way to write technical documentation over recent years. Documentation that has been written in markdown can be uploaded to a source-control repository<em> (github, azure devops)</em>, is lightweight, can be easily edited, and above all is consistent. Collaboration is more obvious with defects being raised when documentation needs revisions. <strong>Overall, the process of maintaining documentation within source control provides developers with a similar experience they are already used to</strong>. This technique leverages an existing workflow, rather than attempting to create a new one.</p><h3>Conclusion</h3><p>A quick summary of this practical guide was to bring awareness to documentation by demonstrating:</p><ul><li>The benefits of documentation</li><li>The steps to produce meaningful documents</li><li>The strategies to instill ownership</li><li>The tools to maintain documents</li></ul><p>Documentation is something easy to look over. What the customer wants ultimately is a quality product — not a pile of documents. A quality product doesn’t just spawn into existence, it’s a journey. The journey to a quality product starts with a quality team, which can be built off of documentation.</p><h3>References</h3><p>This article was inspired by Titus Winters, Tom Manshreck, and Hyrum Wright from their book: <a href="https://read.amazon.com/kp/embed?asin=B0859PF5HB&amp;preview=newtab&amp;linkCode=kpe&amp;ref_=cm_sw_r_kb_dp_90ZSH2FE9Y3XQHFSVW20"><em>Software Engineering at Google, Lessons Learned from Programming OverTime.</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d698ced4a36" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codex/documentation-how-to-build-a-team-1d698ced4a36">Building Teams with Documentation</a> was originally published in <a href="https://medium.com/codex">CodeX</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Manipulate Web Requests]]></title>
            <link>https://jakemellichamp.medium.com/how-to-manipulate-web-requests-ea5cf1c80a90?source=rss-5e3f5b66bfb1------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea5cf1c80a90</guid>
            <category><![CDATA[internet]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[mitm]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[proxy-server]]></category>
            <dc:creator><![CDATA[Jake Mellichamp]]></dc:creator>
            <pubDate>Mon, 27 Dec 2021 14:22:45 GMT</pubDate>
            <atom:updated>2021-12-29T12:48:15.659Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A tool to add to your Software arsenal whether you’re a Software Developer or Cyber Enthusiast.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*lYaY8RDJuoa2LOKO9Rffgg.jpeg" /><figcaption>The fundamentals of a Man-in-the-Middle Attack, Image Credit: simplilearn</figcaption></figure><h4>Purpose of this article:</h4><ul><li>Demonstrate the ability to capture HTTP data as it is communicated between your browser and the server it is communicating with.</li><li>Demonstrate the ability to modify this captured traffic before sending it to destination web servers.</li></ul><p>Why? There are multiple reasons that a person would want to manipulate a web request: To itch a computer enthusiast’s curiosity, to help a developer test website input, or to give cyber professionals insight into a website’s security. Leave a comment if you can think of additional reasons, lets begin!</p><p><strong><em>Also feel free to watch the video below if you would like to see these techniques used in action!</em></strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FoyjXnXSBoFU%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DoyjXnXSBoFU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FoyjXnXSBoFU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d55d8ee46e929108af4bc72a90ce0f52/href">https://medium.com/media/d55d8ee46e929108af4bc72a90ce0f52/href</a></iframe><h4>Where to Start</h4><p>An old friend once told me that this technique is like ‘laying siege’ to a website. Although it won’t actually be a 6 month long battle, the phrase always excited me when we got to perform this kind of exploit at a CTF (Capture the Flag) event or in front of fellow colleagues.</p><p>Now we are going to start this adventure by opening up a random website on your browser of choice. (Hopefully your webpage has a form on it to better demonstrate the following steps).</p><ul><li>You’ll then use some sort of ‘man-in-the-middle’ proxy software to launch a proxy on your local machine. (I’ll be using BurpeSuitebut other software exist like Mitmproxy and more).</li><li>Configure your browser settings to route traffic to this proxy temporarily.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K_xwquFjPtTfZKTbQxcrNw.png" /><figcaption>Setting Browser Proxy Settings, Use manual proxy configuration if need be.</figcaption></figure><p>Once these steps are complete, our ‘siege’ equipment is set up and ready to be used!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*NtsXfTBXavAexCSE6_AlrQ.png" /><figcaption>Overview of web request lifecycle.</figcaption></figure><h3>Viewing the Captured Request</h3><p>You’ll know when your proxy is successfully configured when your web traffic starts to hang. This is because well… all web traffic is being routed to the proxy and stored in the proxies intercept-queue. We can forward the queued non relevant requests until we find the request that matters (Seen Below):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*OljVloLfDAuKLnVzhCMndw.png" /><figcaption>Captured POST Request we wish to Manipulate.</figcaption></figure><p>As we can see, this packet has metadata headers as well as the information payload at the bottom, with a payload being:</p><pre>username=santa&amp;password=password&amp;submit=Login</pre><h3>Manipulating Request</h3><p>In BurpeSuite we can edit the request in the exact window that was previously displaying:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/1*2f9SbainSpuLqwomTHQPDg.png" /><figcaption>A Quick Edit and then Forward</figcaption></figure><p>Simple as that, sweet, request manipulated! However, there are some additional features that come with BurpeSuite that I would like to go over when it comes to the packet manipulation:</p><ul><li><strong>Intruder: </strong>used for automating custom attacks on a web application. It works by taking a base HTTP request and modifying the data in a systematic way. This systematic way involves defining ‘payload markers’ denoted by the <strong>§ character, </strong>and then inserting a ‘payload’ in its place.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HRPumuYmRyQHnsEb-e5sGQ.png" /><figcaption>Example of using Intruder to ‘brute-force’ the password form variable. (Notice the § character)</figcaption></figure><ul><li><strong>Repeater: </strong>used for sending a web request a ‘repeated’ amount of times and analyzing the applications response.</li><li><strong>Sequencer: </strong>used for analyzing the quality of randomness in a sample of data items. You can use it to test an application’s session tokens or other important data items that are intended to be unpredictable, such as anti-CSRF tokens, password reset tokens, etc.</li><li><strong>Decoder: </strong>used for transforming encoded data into its canonical form, or for transforming raw data into various encoded and hashed forms. It is capable of intelligently recognizing several encoding formats using heuristic techniques.</li></ul><h3><strong>Conclusion</strong></h3><p>Whether you a tech enthusiast, Software developer, or cyber security professional I hope you discovered a new tool in ‘web proxy’ software. By using this ‘man-in-the-middle’ approach we can manually throttle our web traffic to analyze the communication our machines are making to one another. Depending on the use case, we can also modify and experiment with sending different request data. Hope you enjoyed the quick walkthrough.</p><p><strong><em>P.S. Don’t forget to reconfigure your browser’s proxy settings to ‘No Proxy’ after doing this exercise!</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea5cf1c80a90" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Magic of Hash Tables, A Quick Deep Dive into O(1)]]></title>
            <link>https://jakemellichamp.medium.com/the-magic-of-hash-tables-a-quick-deep-dive-into-o-1-1295199fcd05?source=rss-5e3f5b66bfb1------2</link>
            <guid isPermaLink="false">https://medium.com/p/1295199fcd05</guid>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[hash-table]]></category>
            <category><![CDATA[optimization]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[algorithms]]></category>
            <dc:creator><![CDATA[Jake Mellichamp]]></dc:creator>
            <pubDate>Wed, 03 Nov 2021 02:25:29 GMT</pubDate>
            <atom:updated>2021-11-04T11:48:09.189Z</atom:updated>
            <content:encoded><![CDATA[<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fav-DdY0vWSw%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dav-DdY0vWSw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fav-DdY0vWSw%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/f8644e6e3234e39c117f92ef2a8f6f82/href">https://medium.com/media/f8644e6e3234e39c117f92ef2a8f6f82/href</a></iframe><p>Ahh yes, the Hash Table, a Computer Science classic. Often our first thought as software developers when facing an unfamiliar problem is:</p><blockquote>“hmmm, can I use a Hash Table to solve this problem?”</blockquote><p>Which I mean, is the correct thought! Hash Tables not only make our logic simple, but they also are extremely quick with constant time accessing speeds!</p><h3><strong>The Inspiration</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/0*kK1YMSAw3qQXY4GI" /><figcaption>Time and space complexity of a Hash Table</figcaption></figure><p>As I wrote the simple Map&lt;String, Integer&gt; my_map = new Map&lt;String, Integer&gt;(); I grew curious about how many lines of code were running underneath-the-hood to make this super convenient data structure work. Which…. led me into a climatic journey in discovering the in’s and out’s of our friend, the Hash Table. Here is a digest of the findings!</p><h3>What is a Hash Table?</h3><p>Ok ok, I’ll keep this part short and sweet I swear… I won’t doubt your intelligence. There are two parts:</p><ol><li>A Hash Table is simply a block of memory (an array) that contains ‘buckets’ which hold the data we want to map too. Phew, easy right? We call them ‘buckets’ instead of indexes because, in fact, in some implementations, the index contains a Linked List (for collisions).</li><li>A Hash Table is also abstractly-addressable, meaning that instead of using an outright offset like: Data = (Memory Location of Array) + (array Offset)we substitute the offset for a user-defined variable and <strong>hash</strong> it into a unique*** integer.</li></ol><ul><li><em>**In a perfect world the value is unique</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zeb9YE4wRQIaXflS" /><figcaption>Illustration of a hash table <a href="https://en.wikipedia.org/wiki/Hash_table">https://en.wikipedia.org/wiki/Hash_table</a></figcaption></figure><h3>Hashing Algorithm</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/0*8y6Obz6FsNVRfULQ" /><figcaption>Hashing with the function ‘f’</figcaption></figure><p>So you might ask yourself, okay Hashing algorithm, easy! The end goal is that we want to take the supplied key and convert it to an Integer. In our example:</p><p>Map&lt;String, Integer&gt; my_map = new Map&lt;String, Integer&gt;();</p><p>We would want to convert our key of type String into an Integer so that we can use it as a substitute for our Array_Offset value. That process it conducted by a <strong>hashing algorithm</strong>, which will yield a large number back, so we use <strong>modulo arithmetic </strong>with the current size of the array to prevent an ‘<em>Array out of bounds</em>’ error.</p><h3>Closer Look at the Hashing Algorithm</h3><p>Neat right?! Okay, but now you might ask yourself:</p><blockquote>“A Hash Table’s key can be any object! Not just a string, how do we convert any Object into an Integer Array Offset?”</blockquote><p>The beauty of a Hash Table is that it can work with any object. How? Well, the only universal trait amongst various objects is that they are all originally made of bits! So with our hash function, we will use bit-wise operations to randomize the object before converting it to an Integer.</p><p>There is no ‘standard hashing function’ that is used throughout all OOP languages, but the C++ implementation of unordered_map uses an algorithm called ‘<a href="https://en.wikipedia.org/wiki/MurmurHash"><strong>MurmurHash</strong></a>’. Below is a simple example of how a 32-bit object can be hashed into a 32-bit Integer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/1*Rw-FQk0R_nJrcoDJWCqRpQ.png" /><figcaption>An example of hashing logic on a 32-bit Object</figcaption></figure><h4>In the above example:</h4><ol><li>We take a 32-bit Object, and spit it into 4 groups of 8-bit blocks.</li><li>With each individual group, we perform an AND instruction with a random static variable Var1</li><li>Bit shift the result to the right, or a ROL Instruction</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/405/1*nMVHua5o9iQ9W2KxV9lDEw.jpeg" /><figcaption>An Example of an ROL instruction</figcaption></figure><p>4. Repeat steps 2 and 3 with a different variable, Var2</p><p>5. Combine each individual 8-bit block back into a 32-bit Object</p><p>6. Read the result as an Integer.</p><h3>Load Factor and Inserting Elements</h3><p>After hashing the key into an indexable integer, we are ready to insert a value at that memory location (the corresponding bucket).</p><p>Remember, the hash table itself is a block of memory, so after a certain amount of inserts, the block of memory will have to recreate itself. This process is relatively expensive — as the data structure will have to allocate a new block of memory, rehash the keys, and copy the values into the new index.</p><p>What determines when a hash table is full? A ‘Load Factor Value’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/170/0*5FVVCXXLLTKXzTSh" /><figcaption>Load Factor Equation</figcaption></figure><p>Load Factor is defined as “<em>The number of entries in the table (n)</em>” Divided by “<em>The Size of the Hash Table (k)”</em></p><p>There’s a check that happens before the insertion of a new element into a hash table. <strong>If the load factor is exceeded on the next insert, then the Hash Table will allocate a new block of memory, rehash the keys, and copy all the data back into the hash table.</strong></p><p>We want to have some wiggle room in the hash table to avoid collisions, this usually means having the array size greater than the number of entries at all times.</p><h3>Conclusion</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*82KrfwNiKlgP57S28iRGsg.png" /></figure><p>Tada! Magic right?</p><p>Overall, the purpose of this article was to explore how the insertion and search time complexity of a standard Hash Table is achieved in constant time. There are plenty of questions that were left unanswered, such as “how to handle collisions with a hash table optimally?” Haha… I’ll let <a href="https://stackoverflow.com/questions/4980757/how-do-hashtables-deal-with-collisions">stack overflow</a> answer some of those unanswered questions you may have. I hope however that you can confidently see how constant time-complexity is achieved with hash tables. Below are five key takeaways:</p><h3>Key Takeaways</h3><ul><li>Hashing functions use bit-wise operations on the Key Value</li><li>The C++ standard library Hashing function is called “<a href="https://en.wikipedia.org/wiki/MurmurHash">Murmurhash</a>”</li><li>The hashing algorithms used for hash tables are not cryptographic algorithms and prioritize speed rather than security.</li><li>A hash table has to rehash it’s values once the load factor is met.</li><li>The standard hashing threshold is 3/4, so a hash table should usually have about 25% memory than storing all elements in an array.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1295199fcd05" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>