<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Sm00g15</title>
    <description>The latest articles on Forem by Sm00g15 (@sm00g15).</description>
    <link>https://forem.com/sm00g15</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F71063%2F32bea15f-2277-48dc-9295-140699668cf3.jpeg</url>
      <title>Forem: Sm00g15</title>
      <link>https://forem.com/sm00g15</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/sm00g15"/>
    <language>en</language>
    <item>
      <title>How Not to Get Hacked Programming Blockchains</title>
      <dc:creator>Sm00g15</dc:creator>
      <pubDate>Sat, 13 Oct 2018 02:22:56 +0000</pubDate>
      <link>https://forem.com/sm00g15/how-not-to-get-hacked-programming-blockchains-2cmn</link>
      <guid>https://forem.com/sm00g15/how-not-to-get-hacked-programming-blockchains-2cmn</guid>
      <description>&lt;p&gt;I'm Sean and I've been a developer for a little over a year. I'm a blockchain/crypto enthusiast and started programming in/around crypto in the strangest of ways....I GOT HACKED! &lt;/p&gt;

&lt;p&gt;Well, not exactly, more like I made a major not so smart mistake. I'll share my experience here so that you won't have to make the same mistake!&lt;/p&gt;

&lt;p&gt;It all started when I took this course by Stephen Grider on Udemy: &lt;a href="https://www.udemy.com/ethereum-and-solidity-the-complete-developers-guide/"&gt;https://www.udemy.com/ethereum-and-solidity-the-complete-developers-guide/&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;I highly recommend it if you're interested in learning how to program smart contracts in Ethereum...it's a super fun course! &lt;/p&gt;

&lt;p&gt;Shortly thereafter, I went to start sandboxing some new apps I wanted to play around with. Well, if you know anything about about programming Ethereum applications that interact with the blockchain, you'll know that you have to provide a 12-word MNEMONIC which serves as your private key (basically your password to your Ethereum address that shows that you own the address). &lt;/p&gt;

&lt;p&gt;Little did I know that since I wasn't using any environment variables and my repo was public, my private key to my account would be open to all of GitHub! After doing a quick search on GitHub, an exposed user looks like this: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kq4rYIdU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/xkly696x8pe48jbue52u.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kq4rYIdU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/xkly696x8pe48jbue52u.jpg" alt="github query"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In short, somebody found my keys on GitHub, broke into my account, and stole my money!!!! Bad day for the wallet, Excellent day for learning! &lt;/p&gt;

&lt;p&gt;TAKEAWAY LESSON: &lt;br&gt;
1) Use environment variables when posting your private key data on GitHub&lt;br&gt;
2) Use private repos when possible for additional safety&lt;br&gt;
3) Use a command-line interface (like readline-sync: &lt;a href="https://www.npmjs.com/package/readline-sync"&gt;https://www.npmjs.com/package/readline-sync&lt;/a&gt;) to enter your private key data at runtime for ultimate safety &lt;/p&gt;

&lt;p&gt;Happy Programming!&lt;/p&gt;

</description>
      <category>ethereum</category>
      <category>cryptocurrency</category>
      <category>blockchain</category>
    </item>
  </channel>
</rss>
