BunnyMan.Infohttp://bunnyman.info/Because life is too awesome not to shareTue, 02 Aug 2016 21:23:00 -0700Building chef-dk on FreeBSD 10http://bunnyman.info/posts/2016/Aug/02/chef-dk-on-freebsd/<p>For those that don’t know I’m a Chef for a living. Not the kind that works with food but one that works with code. What you may not know is I’m a FreeBSD guy, or at least claim to be one. I’ve been building a new FreeBSD workstation and discovered that there is no chef-dk for FreeBSD. Building it isn’t bad, but there is a trick to it.</p> <p>So without further ado, here is building Chef-DK for FreeBSD 10.3 (and probably most &gt;=10.0)</p> <p>If this is a fresh box you need pkg, ports, and some base packages. All this assumes run as root.</p> <div class="highlight"><pre><span></span>pkg install pkg portsnap fetch extract portsnap fetch update pkg install sudo </pre></div> <p>Ok, for the rest of this I am assuming you are running as a user that has sudo rights. If you aren’t then ymmv.</p> <div class="highlight"><pre><span></span>sudo pkg install ruby rubygem-bundler portdowngrade git cd ~ sudo portdowngrade devel/gecode r345033 cd gecode sudo make deinstall install clean sudo sed -ie &#39;s/\(#define GECODE_VERSION_NUMBER\)\s*/\1 300703/&#39; /usr/local/include/gecode/support/config.hpp cd ~ git clone https://github.com/chef/chef-dk.git cd chef-dk USE_SYSTEM_GECODE=1 bundle install --without development </pre></div> <p>There you go! It’s not going to give you the /opt/chef-dk omnibus but you will have all the chef-dk you need to do your stuff! Maybe later I’ll document how to make a package but this will likely work for me.</p> <p>UPDATE 2017-01-17: Thanks to <a href="https://shawnwilsher.com/">Shawn</a> for the GECODE_VERSION_NUMBER update. This was broken several months after this post initally was written</p>D.O.S.Tue, 02 Aug 2016 21:23:00 -0700tag:bunnyman.info,2016-08-02:posts/2016/Aug/02/chef-dk-on-freebsd/freebsd chef chef-dkBaaS: Burnout as a Servicehttp://bunnyman.info/posts/2016/May/02/baas-burnout-as-a-service/<p>I wanna take a moment to to address what I like to call <strong>Burnout as a Service; how I see burnout as a product of the tech industry and culture</strong>. My friends, coworkers, and I have all experienced it in various levels, sometimes to crippling physical side effects. In this article I'm going to use strong language like <em>need</em>, and <em>should</em>, and <em>I won't work with you if you [don't|do] $thing</em>. While I have strong opinions about this subject and feel I have developed a powerful framework for helping avoid burnout it’s bound not to be perfect or complete. I do study this subject at great length in the name of personal development and productivity/energy management so if you have thoughts, opinions, feedback, or insights further into this topic I'd be happy to hear about them in the comments.</p> <p>I'd like to point to <a href="http://blog.lusis.org/blog/2016/04/28/the-flaw-in-all-things/">this article</a>, written by an amazing operations expert who has reached the jaded level where all things are approached solely by the perceived possible failure points, causing decision paralysis. Having lived the fear of doing for the failure it may cause down the road it I personally identify with this brand of burnout myself.</p> <p>In my experience I have come to see burnout as a product of our tech industry's culture more than anything else. There is a lot of different little causes that all stack up on each other; the fast evolution of technology, the constant threat from bad actors, high stakes companies built on investors, product first revenue second business models, fickle customers caused by untested in market products, unheard of before uptime requirements on hastily developed systems, etc. The list could go on listing reasons why the industry itself is a primary source of maximum energy drain.</p> <p>My mother is a healthcare worker who often asks why I make as much if not more than her working on computers. I often have to remind her that every moment, at work or not, I can be more or less responsible for the shut down of an entire company's revenue stream (possibly permanently) not just through negligence but from lack of anticipating the next failure or attack and guarding against it properly.</p> <p>Let that sink in for a few moments. As an Operations Engineer or Developer not just my negligence but my lack of constant vigilance, research, and forethought can destroy an entire company. From bugs that open security holes, infrastructure mistakes that allow hidden-until-failure single points of failure, to a seemingly solid design choice that causes massive cascading failures in ways I never expected<sup id="fnref:1"><a class="footnote-ref" href="#fn:1" rel="footnote">1</a></sup>. Let's not even address what happens when someone makes an oops uh-oh and that backup you <em>really</em> need is coming back corrupt.</p> <p>However all this is the nature of the industry we buy into often with the understanding of that this is how it works. I love having a job where mentally jogging day in and day out to keep pace or even get ahead of developing technology and security vectors. This is my great mental stimulation and when I tire of it I'll go pour drinks at a bar.</p> <p>However we all need to both expend and recover energy in equal amounts. This is a core biological imperative that we don't often think about. Our desire to always be creating (which expends great amounts of mental energy) drives us all to burnout. An amount of rest and recuperation in equal volume and type to our expenditures needs to be done regularly. So many of us ignore the daily, weekly, and monthly cycles of stress and rest that are necessary to work at peak optimal shape. Instead we push for days, week, or even months to try to reach a constantly moving goalpost with a promise that we will someday maybe take that vacation we need. This is only assisted by our 24/7/365 pagers and systems that take no rest, constantly waiting to fail or fall over from the ever present threat of bad actors or full hard drives.</p> <p>I have watched pager fatigue alone completely destroy someone mentally. A poorly managed monitoring system that pages over things that aren't absolutely actionable and urgent or doesn't soft notify well enough in advance things that could be resolved before they become a critical issue is psychological abuse when delivered at the right volume. If someone can't disconnect because of the ever present pages that may or may not be actually actionable and critical then they are being slowly tortured, nerves frayed down with the rasp of their own phones.</p> <p>At an even higher level I think we actively foster burnout amongst our peers and even ourselves with this great rockstar solo act so many of us pull. The concept of the Bastard Operator From Hell (BOFH) is the singlehanded "everything IT" person who has built everything from ground up and maintains everything even in the face of his users "always breaking everything". Because of this they become so jaded that they begin to torment their own end users and customers for mental relief. The worst part of this is we have formed a whole worship culture about being the lone gunman tech asshole to a point where I have seen a lot of people glorifying and emulating it well above and beyond their own time.</p> <p>If we built up the proper support systems both mentally and technically we would be able to weather the storms the environment and systems rain down on us much better. If we worked together as much as possible instead of competing we would be well armed against the ever-present threat of burnout. It tends to be a lot to do with the personality types we pulled to technology for years; high on technical knowledge, low on social skills, lots of communication through digital means and not a lot of interpersonal interactions. Mix this in with the E/INTJ Type A personalities that are drawn to this higher stakes world of startups and high payoff companies and we develop this culture where we think everyone needs to be a rockstar or a ninja. We slim down staffing and just "hire the most brilliant mind in tech" to not just design but also implement and support these companies ad infinitum or more realistically, until they burn out, quit, or both.</p> <p>I understand staffing is expensive and money is tight when your product is still only on the verge of success but in so much of operations and development we are paid to think, not to turn cogs. We design, develop, and foster ideas and solutions to problems no one else has solved. These kinds of ideas are not easily grown in a vacuum, but best cultivated through discourse and experimentation. However difficult it is to measure these expenditures or notice when they are getting strained there are ways we can approach them that helps identify issues faster as well as spread the mental load out more safely.</p> <p>The best thing that ever happened to me in my experience in operations was learning to foster an interpersonal technical rapport with my co-workers and keeping it open. Constantly jogging ideas back and forth, never letting myself, or them stick on a problem and instead kicking it out to jog between us. I've done it twice and now it's a job requirement for me. The ability to "pair up" with operations to constantly foster and develop the most efficiently.</p> <p>You see a lot of this starting to bud up in the tech world these days actually;</p> <ul> <li>Open floor plans and chat based teams open up as much quick and easy discussion on issues as possible.</li> <li>Code reviews are becoming the norm not just in development but in several forms of operations<sup id="fnref:2"><a class="footnote-ref" href="#fn:2" rel="footnote">2</a></sup>.</li> <li>The whole DevOps movement has large parts about enhancing communication and working together with others to help pool strengths and minimize weaknesses.</li> <li>Some parts of agile/scrum are all about raising concerns and roadblocks as quickly as possible to put them up to the whole group, not trying to stick a single developer to solve a hard problem.</li> <li>Pair programming is the next evolution of this, literally putting two minds to a single problem to solve it as efficiently and quickly as possible.</li> </ul> <p>Even with all these trends though I still don't see enough of it, enough brainstorming, enough idea swapping, enough "Hey man I'm trying to do this like this but..." and that's why we are stuck staring at the flaws in every system. We work in our closed loops assuming that Issac Newton really did just sit under a tree staring at apples until he invented the Law of Gravitation so if we stare at our Apples and burn up all our mental energy the best way to handle this new package deploy will come to us. This is really where burnout comes from.</p> <p>In closing I'd like to talk a little bit more about my mother. She's been a registered nurse her whole professional life. She's started in emergency rooms and for as long as I remember has been a hospice nurse. As you can imagine she's best at dealing with emergencies and the dying. Having dealt with the maimed and dying her whole life she's gone though mandatory on the clock grief therapy all of her professional life as well. In heath care when you deal with extreme emotional situations they regularly put you through therapy to help deal with and recover from what you work with. Whenever I ask someone who works about it it feels obvious to them that someone put though that level of emotional strain regularly would snap and do something horrible if they didn't receive regular emotional therapy. So as someone who goes through regular mental strain what are you doing for mental therapy to prevent your own burnout?</p> <hr /> <h2>tl;dr</h2> <p>In my opinion burnout is a natural product of the tech industry culture. In order help combat this you need to do all of the following, which is not a panacea but a powerful preventive framework;</p> <ul> <li>Work with others to help solve problems instead of trying to be a rockstar and solve them all yourself.</li> <li>Create review processes around configuration and software changes so that you have reduced liability and risk.</li> <li>Work with someone to develop intelligent alerting as well as a support rotation that allows rest and relaxation cycles as frequently as possible to reduce pager fatigue.</li> <li>if you have critical failures more than once a quarter you need to review your infrastructure &amp; procedures and ask yourself what your company is doing that's more important than having a reliable, usable product.</li> <li>Rest yourself mentally every day, take breaks when you are locked in to a problem, and take regular vacations.</li> <li>Bring in as much positivity to your workplace and your life as possible.</li> <li>Fight negativity by analyzing it down to its root causes instead of superficially dismissing or accepting it.</li> </ul> <p>And I hear you saying it already; "<em>This isn't important right now</em>", "<em>I/we don't have the bandwidth for this at the moment</em>", "<em>I'm doing fine right now</em>", or the worst "<em>I'm not gonna burn out</em>".</p> <p>But know that when you <em>do</em> burn out I can promise you that you <em>absolutely will not</em> have the bandwidth or mental energy to do these things. By the time you are so far into burnout you actually become self aware of it deadlines will have slipped, everyone's already jaded and unhappy, and maybe you won't even care enough to implement this change.</p> <div class="footnote"> <hr /> <ol> <li id="fn:1"> <p>I have some amazing stories about Sybase databases running on a failover Sun Cluster using Veritas Volume Manager and the catastrophic problem with SCSI-3 reservations preventing disks to randomly not be mountable during a fail over event caused only when the LUNs are provided from newer NetApp hardware. Long story short, the database will start without half it's disks and it is not a pretty sight where it goes from there.&#160;<a class="footnote-backref" href="#fnref:1" rev="footnote" title="Jump back to footnote 1 in the text">&#8617;</a></p> </li> <li id="fn:2"> <p>The third best thing I have ever done in my career so far was take all of a companies critical configurations (haproxy, dns, maintenance crons, backup scripts, monitoring, ect) and put them in git, created a code review process, and used jenkins to deploy to production. Call it CI/CD, call it change control, call it whatever you want; I call it almost never again making that one line stupid oops uh oh that breaks an entire system again.&#160;<a class="footnote-backref" href="#fnref:2" rev="footnote" title="Jump back to footnote 2 in the text">&#8617;</a></p> </li> </ol> </div>D.O.S.Mon, 02 May 2016 00:00:00 -0700tag:bunnyman.info,2016-05-02:posts/2016/May/02/baas-burnout-as-a-service/Being Happyhttp://bunnyman.info/posts/2015/Dec/30/being-happy/<p>In my personal experience not everyone wants to be happy. When I say that I'm not <em>talking about that one friend</em> either. I'm talking about me. For a very long time I didn't wanna be happy. It was a very frustrating time. I can't say I knew I wanted to be unhappy, I just was all the time. I was angry, depressed, and off and on apathetic. It was actually my mother who coined the phrase <em>"You just need to be unhappy."</em> somewhere in my early to mid 20s.</p> <p>Above and beyond my own internal strife one of my problems was that those around me were constantly interested in trying to make me happy. Maybe that doesn't sound like a problem to you but it was aggravating to me. It wasn't that people wanted to help it was this frustrating struggle of people offering what I saw as cookie cutter back pats and weak attempts to stoke a nonexistent ego instead of just facing the truth and seeing the world like I saw it. They didn't understand my problems. I thought about how miserable life is and how horrific this whole world works. I thought all the time about how my mediocre skill set in an over saturated field that shared a job pool with savants &amp; geniuses meant I would going to toil and claw against an over abundant and under paid workforce. I thought about how compared to my peers my nothing-to-offer existence meant I get to writhe away in this world alone with a few cynical friends to cheerlead ourselves along to the grave. I looked at the ugly side of every story and trust me when you stop sugar coating everything you realize that there is millions of fucked up things going on every day and we do our best to gloss over it and put lipstick on this pig so that we can wake up and say today is an awesome day. This whole world is a corrupt Masque of the Red Death; an extravagant gala thrown by the privileged to hide away the social plague destroying everyone else around us.</p> <p>Over time I learned how to communicate with others about my feelings in ways that helped prevent the constant fawning over my state. Of course I had to be highly selective of who I chose to associate with since I didn't want to have to go through this rigmarole constantly. I wasn't <em>happy</em> at that point but I reached this semi-content equilibrium where I got by with thick sense of dark humor and snark, as much as one possibly could exist in this sickness.</p> <p>After a long while doing this I reached this weird nirvana where I was just me, and everyone was ok with it and I was ok with it to. I was just ok. Then the weird shit happened.</p> <p>Through having this small social group, literally six to eight people deep, I was able to find this confidence in myself. Maybe what I could do was shit to anyone else but I could do things that made a difference to my friends, or at least impressed them. Over a period of about ten years give or take this grew, as well as my social circle. I often felt like the imposter in the room but through all these people I started to realize my own potential.</p> <p>I can't say the exact moment it hit me. I know it was when I was working for Stephens. I had stuck my foot out enough times and somehow not gotten the door slammed on it enough times that I had made it somewhere in the company. The group I was running hadn't completely imploded on itself around me yet and I was a pretend famous DJ. Somewhere around this time it dawned on me that life isn't the Olympics but an Industry and even if I sucked the fact I wasn't going to stop trying made me valuable.</p> <p>It was around that time I stopped reading fiction and switched to non-fiction. I read a lot of 90s-00s new era "be awesome at life" self help books and started implementing all these systems and tricks I read about.</p> <p>My personal mantra around then was <em>"It Never Hurts to Help"</em>; a tongue in cheek reference to a cartoon from my youth called <em>Eek the Cat</em>. It was a morbid tale about an anthropomorphic feline whose overly sunny attitude and unflappable willingness to help other constantly ended him up in the hospital. That was his catch phrase, the one he said right before he was mauled by something. I like to say I was using it ironically since in the end I rarely caught fire after saying it but I did end up getting places professional and personally.</p> <p>Needless to say life started moving really fast when I became truly motivated to help and get things done. I can't say I was happy... but I was really busy.</p> <p>It was around then the shift really happened. I don't know if my attitude shifted first or those around me but things became nightmarishly disjointed and stressful at work over bad management, the club promoters I was working with went to war with another promotions group, and the community I was dealing with collapsed around the time someone slept with a minor unknowing and then someone else killed themselves. Needless to say these were dark times. However through all this stress I had a mantra and I stuck to it. Suddenly I was a too positive person for those I was around.</p> <p>I was right back to where I was before in the reverse way. Everyone told me I need to "take it down a notch" and accused me of being disingenuous and sarcastic simply because I'm living my live the way I chose. I can't possibly feel like that, I can't do this, and we can't do that.</p> <p>That's when my mantra changed to <em>"I Only Have Cans"</em>. Just like before I had to adjust who is important in my life since I don't want to surround myself with those who are going to try to slow my progress and scowl at my outlook. This new mantra isn't just a tongue and cheek spite of never giving up and always helping. This one is only having the positive, always being able to do something. I guess that's when I decided to be happy?</p> <p>I can't say I'm always happy. In fact I'd go so far as to say no one really stops dealing with depression. I still have the eternal funeral procession of self doubt, loathing, paranoia, and ill wishes flickering through my mind like an unending film. However I <em>can</em> decide it doesn't control me and I have way way better things to do with my life than be consumed by my own innate apathy. I <em>can</em> say that I'm in control of my outlook and what is important to me and I <em>can</em> control the world around me enough to decide I'm gonna be happy this day.</p> <p>My mantra has been changing lately. I didn't have a mantra for over 26 years and now suddenly in eight years I have gone through three of them. Like I said, things started moving fast. It's not final, nothing is, but these days I'm sticking with <em>"Be Fucking Amazing"</em>.</p> <p>Not bad for someone who needed to be unhappy almost his entire life.</p> <p>For those who actually read this far, I didn't write this to publicly stoke my dick at everyone or at least that wasn't the original intention. I've been thinking a lot lately about those around me who are unhappy now. I get a little sad and want to go make them happy which reminds me of where I stood not that long ago. I'm not going to pretend my story applies to anyone else and this should be shared around facebook by duck lip hotties as some overly winded <em>it gets better</em> back pat. However I'd like to hope that there are plenty of people who struggle with needing to be unhappy that will learn to take control of their own world and be fucking awesome in their own right.</p>D.O.S.Wed, 30 Dec 2015 00:00:00 -0800tag:bunnyman.info,2015-12-30:posts/2015/Dec/30/being-happy/Quick Note on GnuRadio on Pentoohttp://bunnyman.info/posts/2015/Sep/06/pentoo-grc-atom/<p>Not a big blog, but a quick problem I got solved on IRC that I thought might help others.</p> <p>I have a Gateway LT4009u with an Atom N2600. It's my "hacker/workshop" laptop. The atom N processors are a bit gimpy so sometimes things don't run right. One thing is GNURadio on Pentoo. Pentoo runs hardened and this pisses off the atom n.</p> <p>So if you get the following error.</p> <div class="highlight"><pre><span></span>LLVM ERROR: Allocation failed when allocating new memory in the JIT Can&#39;t Allocate RWX Memory: Operation not permitted </pre></div> <p>Then you need to soft disable hardened with the following command</p> <div class="highlight"><pre><span></span>sudo toggle_hardened </pre></div> <p>I hope that helps anyone else on the internet.</p> <p>Thanks to Zero_Chaos in #pentoo on irc.freenode.net for the fix (and pentoo)</p> <p>Quick Update: This also happens when running in VirtualBox 5 on my 2015 MacBook i7, but the fix is the same</p>D.O.S.Sun, 06 Sep 2015 15:03:00 -0700tag:bunnyman.info,2015-09-06:posts/2015/Sep/06/pentoo-grc-atom/grcMonitoring Chef runs without Chefhttp://bunnyman.info/posts/2015/Apr/24/nagios-chef-run-check/<p>I, like many sysadmins, really want to monitor all the things I actually care about. Monitoring is in general <em>hard</em>. Not because it’s hard to set up, but it’s hard to get right. It’s really easy to monitor ALL THE THINGS and then just end up with pager fatigue. It’s all about figuring out what you need to know and when you need to know it.</p> <h3>So in this case I really need to know that my machines are staying in compliance with chef.</h3> <p>There was a few ways you can do this. The first thought I had was adding a hook into all of my runs and having them report in on failure. This is mostly because I’m always looking for another way to hack on Chef and work on my ruby. The big problem with this is:</p> <ul> <li>What if the node is offline?</li> <li>What if the cron doesn’t fire?</li> <li>What if chef/or ruby is so borked it can’t even fire the app</li> <li>What if someone disabled chef</li> </ul> <p>I need a better solution</p> <h3>Knife Status</h3> <p>Knife status is just awesome, it has some awesome flags and generally I run it far more than I should. The great part about this query the server approach is that it lets me know;</p> <ol> <li>The server is still happy and spitting out cookbooks to nodes</li> <li>The status of ALL of my runs from the “source of truth” for runs</li> </ol> <h3>Not making my chef test rely on chef</h3> <p>But I’m not going to shell knife status. I’m a damn code snob and something about having the chef test rely on the chef client status didn’t seem right.</p> <p>Instead I wrote a nagios script that I am not going to share in it’s entirety here because $WORK_CODE<sup id="fnref:WORKCODE"><a class="footnote-ref" href="#fn:WORKCODE" rel="footnote">1</a></sup>… <em>insert sad face</em> but I will tell you exactly how I did it.</p> <h2>How to python your chef, or how I stopped worrying and learned to love that I can still use python to do anything.</h2> <p>I’m the most experienced in python and almost all of our internal nagios checks we have written in python. So this is in python.</p> <h3>Step one</h3> <p>Use <a href="https://github.com/saj/pynagioscheck">pynagioscheck</a> and <a href="https://github.com/coderanger/pychef">pychef</a>. Seriously. Don’t reinvent the wheel here.</p> <h3>Step two</h3> <p>Create a knife object. have it take all your settings on initialize, then you can create functions for all the different knife commands to recreate them with pychef.</p> <p>You really only need status for this one. The meat of status is this here, coderanger dropped this on me in IRC</p> <div class="highlight"><pre><span></span><span class="k">for</span> <span class="n">row</span> <span class="ow">in</span> <span class="n">chef</span><span class="o">.</span><span class="n">Search</span><span class="p">(</span><span class="s1">&#39;node&#39;</span><span class="p">,</span> <span class="s1">&#39;*:*&#39;</span><span class="p">):</span> <span class="n">nodes</span><span class="p">[</span><span class="n">row</span><span class="o">.</span><span class="n">object</span><span class="p">[</span><span class="s1">&#39;machine name&#39;</span><span class="p">]]</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">fromtimestamp</span><span class="p">(</span><span class="n">row</span><span class="o">.</span><span class="n">object</span><span class="p">[</span><span class="s1">&#39;ohai_time&#39;</span><span class="p">])</span> </pre></div> <h3>Step three</h3> <p>Now from here I created a TimeChecker object. It takes the dictionary of <code>{ server: datetimeObj }</code> on it’s init. For consistency sake I also init <code>self.now = datetime.now()</code>. Then I have a <code>TimeChecker.runs_not_in_the_last()</code> that just takes an int. </p> <p>The magic of <code>runs_not_in_the_last</code> I will also share with you because I’m proud of this damn script and want to share it with the world</p> <div class="highlight"><pre><span></span><span class="n">diff</span> <span class="o">=</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">hours</span><span class="o">=</span><span class="n">hours</span><span class="p">)</span> <span class="k">return</span> <span class="p">[</span><span class="n">k</span> <span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">runtimes</span><span class="o">.</span><span class="n">keys</span><span class="p">()</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">now</span> <span class="o">-</span> <span class="bp">self</span><span class="o">.</span><span class="n">runtimes</span><span class="p">[</span><span class="n">k</span><span class="p">]</span> <span class="o">&gt;</span> <span class="n">diff</span><span class="p">]</span> </pre></div> <p>Bam!</p> <h3>Step four</h3> <p>Now just extend <code>NagiosCheck</code> with <code>KnifeStatusCheck</code>, make all your options and other goods in your init and then make your <code>check()</code></p> <p>In the check you make knife, Make a <code>Timechecker</code> with the status return… then all you have to do is see if you have any <code>runs_not_in_the_last</code> for critical and then warning.</p> <h2>Gotchas and cleanup notes</h2> <h3>USE EXCEPTIONS</h3> <p>seriously, this can and will make them so catch them properly and return errors. You will need to catch and handle AT LEAST - URLError - Status - UsageError - ChefError - At least two of your own exceptions</p> <h3>SSL errors</h3> <p>So there is no trusted_certs here. You need to either give your server a working cert, install the snake oil into the nagios server as acceptable or do the dirtiest of monkey patches.</p> <div class="highlight"><pre><span></span><span class="c1"># Dirty Monkeypatch</span> <span class="k">if</span> <span class="n">sys</span><span class="o">.</span><span class="n">version_info</span> <span class="o">&gt;=</span> <span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">7</span><span class="p">,</span> <span class="mi">9</span><span class="p">):</span> <span class="kn">import</span> <span class="nn">ssl</span> <span class="n">ssl</span><span class="o">.</span><span class="n">_create_default_https_context</span> <span class="o">=</span> <span class="n">ssl</span><span class="o">.</span><span class="n">_create_unverified_context</span> </pre></div> <p>But before you do this think of the children!!!</p> <h3>Weird ass errors with join</h3> <p>I need to maybe open a ticket and patch pynagioscheck but I had the weirdest bug when raising a critical. It would die in the super’s check on <code>“”.join(bt)</code> or something of the ilk.</p> <p>My work around was to not just pass <code>msg</code> to the Status exception but to make msg a list and put the main message in <code>msg[0]</code> and then put the comma joined list of servers out of compliance in <code>msg[1]</code>. This means the standard error comes up on normal returns but if you run the check with <code>-v</code> it will give you a list of servers out of compliance for troubleshooting or debugging. Not bad.</p> <h3>Handling the pem file</h3> <p>Eeeeehhhh This maybe my one cop out in the whole script. Basically I created a nagios user in chef with a insane never to be used again and promptly lost password and put the nagios.pem file alongside the check script. Then I let the script optionally take a pem name, and it just checks that the pemfile is alongside the check script. I was considering letting you specify a pem script somewhere on the server or in the Nagios’s users home directory but decided to bite that and take the simplest route there.</p> <h3>Don’t destroy your nagios server</h3> <p>Seriously. Did you see this code? Run a search on all nodes and then return an attribute for every node in your nagios server. This is not the worlds fastest check script.</p> <p>Unless you dedicate some serious power to your solr service on your chef server you should make sure to only check this service once every ten minutes tops. I only check once an hour normally and then follow up with 10 minute checks on fail on my server since I only do converges every four hours so an “out of compliance” warning for me would be at the 12 hour mark and critical at 24 hours<sup id="fnref:MATH"><a class="footnote-ref" href="#fn:MATH" rel="footnote">2</a></sup>.</p> <div class="footnote"> <hr /> <ol> <li id="fn:WORKCODE"> <p>I don’t yet have any clearance to post or share anything I write for, while, at, or around work. The company owns all that, but we are currently working on getting to the point where we can share some stuff. Especially things not so related to our IP like infrastructure code, cookbook, checks, ect.&#160;<a class="footnote-backref" href="#fnref:WORKCODE" rev="footnote" title="Jump back to footnote 1 in the text">&#8617;</a></p> </li> <li id="fn:MATH"> <p>The reason I picked these numbers is I don’t want to know the FIRST time a converge fails. I use the <a href="https://supermarket.chef.io/cookbooks/omnibus_updater">omnibus_updater</a> in my runs (Pinned version in attributes of course) so a failed run can be normal. Plus I am deploying something that important I am going to spot check runs and verify everything gets run with <code>knife ssh</code>. I just want to know mostly if a machine is out of the loop for more than a day because that’s a node that needs to get shot.&#160;<a class="footnote-backref" href="#fnref:MATH" rev="footnote" title="Jump back to footnote 2 in the text">&#8617;</a></p> </li> </ol> </div>D.O.S.Fri, 24 Apr 2015 13:52:00 -0700tag:bunnyman.info,2015-04-24:posts/2015/Apr/24/nagios-chef-run-check/nagioschefAn Open Yearhttp://bunnyman.info/posts/2015/Apr/17/open-year-2015/<p>It's been about a year since my last post, mostly frustrated with Chef as a beginner. Now I spend most of my day writing cookbooks and recipes. In fact I am even helping the Lead Dev at work learn Chef and got back from Chef conference. There I met a lot of amazing people and even <a href="https://github.com/chef/chef/pull/3231">offered to help maintain BSD support in chef</a>.</p> <p>This post isn't about that so much. It's mostly about a behavior I noticed I picked up. When I worked for Stephens Media I spent a lot of my energy trying to contribute, in posts, open source, pull requests, ect. Then when I moved to Slickdeals.net my time was really sucked up. I drifted from working on Pelican and stopped doing as many pull requests. At some time I set up a personally hosted Stash instance. Then I locked that stash instance off behind a login. Then I started writing in my private confluence instead of here. Now all my projects these days are All Rights I noticed... hmph.</p> <p>I don't know exactly what triggered this sharephobia but it needs to stop. I almost think it's some weird greed involving my personal time and effort but if I was greedy wouldn't I want people fixing up my code for me? Is there some revolutionary private research in all this that makes me more valuable? I think showing off my abilities and progress makes me more valuable.</p> <p>I'm just currently working on pulling all my code out of my stash and putting it onto github, with a much better BSD license. I'm remembering what the subtitle of my blog really means.</p> <p>I've spent a lot of time studying Ruby since I finished my DBA course. There is still a lot of areas where Chef could use improvements and I plan to do a lot about it. We are going to make BSD a first class citizen with Chef and hopefully many of it's tools and cookbooks too.<sup id="fnref:FUNFACT"><a class="footnote-ref" href="#fn:FUNFACT" rel="footnote">1</a></sup></p> <p>Remember when I used to post monthly? Hahahaha. I don't want to use this as a journal, I already have one of those but I wanted to give a bigger picture life update since I am updating pages and testing my jenkins build trigger with github ;p</p> <div class="footnote"> <hr /> <ol> <li id="fn:FUNFACT"> <p>I have always preferred UNIX to Linux. My first sysadmin job was a Solaris Admin, a job I did for a long time. With the advent of SystemD I've gone back to my love in the form of BSD.&#160;<a class="footnote-backref" href="#fnref:FUNFACT" rev="footnote" title="Jump back to footnote 1 in the text">&#8617;</a></p> </li> </ol> </div>D.O.S.Fri, 17 Apr 2015 17:15:00 -0700tag:bunnyman.info,2015-04-17:posts/2015/Apr/17/open-year-2015/Chef Frustrationshttp://bunnyman.info/posts/2014/Jul/14/chef-frustrations/<p>I've spent the last week working on implementing chef. The experience is frustrating to say the least. Instead of whining I wanted to take the time to write out some of my pain points and hopefully offer some constructive fixes to what I see as the wall in the learning curve.</p> <p>Now to be clear up front. Most of my problems aren't with Chef, Ruby, or most of the core product; it's with implementing it. To be more precise I think the failure REALLY is documentation.</p> <h2>Anti-pattern One: Getting Started (into a corner)</h2> <p>Also known as the "Just enough to be dangerous but not useful" anti-pattern</p> <p>I really liked the new learn chef. I have to give them a ton of credit for all the work <strong>but</strong> underneath all the new splash and presentation it's still the exact same old Chef 101 it was two years ago; it teaches you the barest of all basics and then drops you off to docs.opscode.com</p> <p>I know that most would feel that statement isn't fair, since it teaches you all about the design and system behind how chef works, and that it does; but it still feels like not enough to be useful and here is why.</p> <h2>Anti-pattern Two: We Have no Patterns...</h2> <p>Learn Chef teaches you how chef works but not really how to use it at any level of scale; There is no real world usage taught anywhere. It teaches you to set up a Chef Enterprise server and then re-inventing the wheel with a homemade apache or ntp cookbook, and push it all to a vm <em>but you would rarely do this in practice right?</em> </p> <p>When you leave Chef's documentation you learn about many very important Chef Patterns;</p> <ul> <li>wrapper cookbooks</li> <li>berkshelf way</li> <li>one repo per cookbook vs monolithic repo</li> <li>application cookbooks</li> <li>service cookbooks</li> </ul> <p>Why doesn't chef teach us these? Is this something we save for consultants to teach us at thousands of dollars an hour? Is it that Chef wants to avoid teaching patterns in order to remain as flexible as possible<sup id="fnref:APME"><a class="footnote-ref" href="#fn:APME" rel="footnote">1</a></sup>?</p> <p>It's not just chef either. Go to http://berkshelf.com and tell me how to use this tool assuming you've never done such before. If I was trying to remember a few commands or learn a new trick on top of something this tools docs would be great but it's missing the meat of what this tool is designed for and how to use it. A lot of chef's tools are treated this way.</p> <h2>Anti-pattern Three: ...So please learn everyone else's anti-patterns</h2> <p>This is my biggest frustration, OPD; Other People's Docs. As someone who has been working in Systems for 10+ years I have lived and learned so much from everyone else's blogs, which is why I feel the need to blog all my own lessons and information.</p> <p>I feel that chef relies <em>too much</em> on OPD though. Especially because chef is such a fast moving target. It's amazing how many people who use chef that I talk to that use it in some odd, bizarre, and or generally 'not correct' way. It's usually because they learned a bad habit from a predecessor or found a bug in a long ago version and found some OPD that convinced them that "<em>oh no you have to run everything chef-solo with your own special bootstraps, that is the ONE TRUE WAY™</em>". I'm not saying that patten doesn't work but I doubt it's the best way for many infrastructures<sup id="fnref:ACTUALLY"><a class="footnote-ref" href="#fn:ACTUALLY" rel="footnote">2</a></sup>.</p> <p>I plan on documenting plenty of chef like things myself; in fact I plan on posting as much of my own OPD as possible but with how fast chef evolves as a product and with the large variance of methods for different environments I really hope people take everything with a grain of salt and read the date on the post when consitering my advice.</p> <p>Here is a great example; where about 2014-07 I went into #chef and asked about some methods for setting things up and was linked to <a href="http://misheska.com/blog/2013/06/16/getting-started-writing-chef-cookbooks-the-berkshelf-way/">this blog</a> which is treated like a defacto example of how to do things. But read all those updates... and then notice how it's using a lot of deprecated methods. I was linked to an article that could be titled "How to develop some really bad habits, but learn important things while you are at it." It's not Mischa's fault, It doesn't seem like he is a docs writer for Chef. Honestly I feel the best thing that could be done is this document be updated to the latest methodologies and tacked on to the end of learn chef as "One good method to get your enviroment up and going".</p> <p>As a chef user do you even know about chef-dk? you probably should take a break from what you are doing, <a href="http://www.getchef.com/blog/2014/04/15/chef-development-kit/">read this</a> and then <a href="https://gist.github.com/lamont-granquist/40d26b6fa8178212594f">do this</a>. Seriously don't you feel much better? This also should be on the end of learn chef guide. Hell this should probably be the first half of the learn chef guide.</p> <p>I get that maybe they don't want to declare a "chef way" to do things... but at least give us some better hints.</p> <h2>Next Actions</h2> <p>Just to recap;</p> <ul> <li>I believe chef's biggest weakness is documentation, which creates a wall in the learning curve to hit right after "I can now build and deploy a test apache on a linode" and "I can build and deploy this in a staging enviroment"</li> <li>I think there should be a learn chef 200 series that goes over;<ul> <li>Using a wrapper cookbook, and the different types of abstraction you often see with these.</li> <li>Teaching everything chef-dk adds; bootstrapping, runtests, and automated integration testing.</li> <li>Highlighting several useful patterns for cookbook development.</li> <li>Using more of chef's tools; ex ohai</li> </ul> </li> <li>If chef is going to rely on the community for docs maybe it should create a way where they can contribute to the main docbase just like they do code.</li> <li><a href="http://misheska.com/blog/2013/06/16/getting-started-writing-chef-cookbooks-the-berkshelf-way/">go here</a>, have your life changed</li> <li>If you are in the Las Vegas, NV area come hang out at #lvdevops on freenode and tell me how I make you feel</li> <li>I'm going to spend another week or two trying diferent ways to structure my cookbooks and see what works.</li> </ul> <div class="footnote"> <hr /> <ol> <li id="fn:APME"> <p>I believe this is a horrible anti-pattern in documentation. If you believe your power is flexibility then you should highlight that but still outline some predominate patterns for your top two or three use cases.&#160;<a class="footnote-backref" href="#fnref:APME" rev="footnote" title="Jump back to footnote 1 in the text">&#8617;</a></p> </li> <li id="fn:ACTUALLY"> <p>I know it's not the best way because they are deprecating chef-solo for chef-zero, which is <em>good</em> but it's a great example about the speed that Chef is changing.&#160;<a class="footnote-backref" href="#fnref:ACTUALLY" rev="footnote" title="Jump back to footnote 2 in the text">&#8617;</a></p> </li> </ol> </div>D.O.S.Mon, 14 Jul 2014 18:24:00 -0700tag:bunnyman.info,2014-07-14:posts/2014/Jul/14/chef-frustrations/chefWhere have you been?http://bunnyman.info/posts/2014/Jul/13/update-2014/<p>Actually I should have called this where have <em>I</em> been. This seemed catchier though.</p> <p>In short the answer is I have been at my new job at http://slickdeals.net They have keep me as busy as can be. Because of this major shift I changed a lot of habits; I stopped writing here as much, I stopped actively contributing to Pelican<sup id="fnref:PEL"><a class="footnote-ref" href="#fn:PEL" rel="footnote">1</a></sup>, and I also stopped posting to github.</p> <p>Be not too afraid. I still write plenty of code and fille around with everything. I just stopped posting most of it to github. I mostly use my own <a href="http://stash.bunni.biz">private stash instance</a>. There is some publically accessable code for those who are interested. The reason is that stash is SIGNIFICANTLY cheaper for my private repos so I just put most of my stuff there. I have been rethinking that lately since I miss a lot of the github community style.</p> <p>I haven't been blogging much since I have just been focusing most of my documentation and writings to work, and got in the odd habit of putting eveything in my private wiki. For the sake of sharing and hashing things out I am going to refocus on using this blog to document out useful things. Hopefully this means you cna excpect floods of useful things. Maybe some smaller posts too.</p> <p>On the other side I have been busy with my girlfriend, cycling, dba courseware, studying Japnaese, and my unstoppable anime habit. I have my own house now and a workbench set back up so I may blog about those projects as well...</p> <p>Anyways. No one loves a vanity post but I wanted to at least put an update out</p> <div class="footnote"> <hr /> <ol> <li id="fn:PEL"> <p>I'm really sad about this but my personal time dropped sharply between a new job and new girlfriend.&#160;<a class="footnote-backref" href="#fnref:PEL" rev="footnote" title="Jump back to footnote 1 in the text">&#8617;</a></p> </li> </ol> </div>D.O.S.Sun, 13 Jul 2014 00:00:00 -0700tag:bunnyman.info,2014-07-13:posts/2014/Jul/13/update-2014/Coming back to vimhttp://bunnyman.info/posts/2013/Apr/11/back-to-vim/<p>It's time for my monthly or so post! I wanted to go through and post about my OpenBSD firewall I built but that's not 100%. Also I'm not ready to go on about anything amazing with puppet because without my lab being done puppet isn't useful so lets go back to talking about my dev environment!</p> <p>I know Justin has been asking for this for a little while.</p> <h2>Preface: Going "back" to vim</h2> <p>As a sysadmin at work I use vi a lot. Not even vim; vi. We have lots of unix boxes that default to vi as the installed editor and we don't just go installing vim on everything. Personally I use vim a good amount on my machine since I spend a lot of command line time anyways. I know more than just a few of the commands but I really only consider myself a second or maybe third year vim user<sup id="fnref:YEARS"><a class="footnote-ref" href="#fn:YEARS" rel="footnote">1</a></sup> since I never used it full time to write code. I live the motion and use things like <code>ci[</code> and <code>C-v 5j x</code> but I still fail to use multiple registers, buffers, or tabs… or even the leader commands.</p> <p>I'm an amateur software developer at best; I have serious aspirations about seeing if I have the chops to go pro but right now I'm honing edges. Irregardless of how developer or not I may be, I am developer lazy so I spend money on tools that make my life easier. I've been using PyCharm to help me write utilities and my mini apps and it's just the best. Sometimes I worry about leaning on IDE tools stunting my abilities so I took some time a month back to stand up and step back from PyCharm and instead just use vim…</p> <p>This is the setup.</p> <h2>Part One: My keyboard</h2> <p>I use a slick trick on my Mac so I have no access to Caps and my CapsLock key acts as BOTH a Ctrl and Escape. If I tap the Caps it's esc, if I chord it with anything else it registers Ctrl… I pinkie reach for <em>nothing</em>. Here is the the instructions, 10.8 approved so YMMV for other versions.</p> <ol> <li>Go to System Preferences -&gt; Keyboard -&gt; Modifier Keys. Set Caps Lock to <code>^ Control</code>.</li> <li>Install <a href="http://pqrs.org/macosx/keyremap4macbook/">KeyRemap4MacBook - Software for OS X</a>.</li> <li>In KeyRemap4MacBook, enable <code>Control_L to Control_L (+ when you type Control_L only, send Escape</code>. Search will help.</li> <li>Reboot and enjoy.</li> </ol> <h2>Part Two: The Development Server.</h2> <p>You didn't think I was just going to <code>vim run.py</code> and take off did you? No.</p> <p>If I'm going to work from the shell I want to make it so I can work from anywhere while I am at it. I have a Mac OS X server that would love to be my dev box so away I go. Open some ports, SSH keys, virtualenv, python3 from brew… tada! But it's not ready yet.</p> <p>OpenSSH is my best friend. I keep keys close at all times and use cools scripts on my laptop to help manage them. However SSH is not enough and this is where <a href="http://mosh.mit.edu/">Mosh: the mobile shell</a> comes in. Mosh isn't a total end to end transport solution but it's high speed udp style and local echo features make it supreme when then connection starts lagging and you don't want it to slow down your code. Best yet? <code>brew install mobile-shell</code> on both boxes… done…</p> <p>If only we had a windows client already.</p> <p>If you want some portable keys help check out the following;</p> <ul> <li><a href="/posts/2013/Feb/25/ssh-on-usb-on-mac-os-x/">BunnyMan.Info — SSH Keys on a USB jump drive on Mac OS X (Mountain Lion Edition)</a></li> <li><a href="/posts/2013/Mar/07/ssh-on-usb-on-mac-os-x-scripts/">BunnyMan.Info — SSH Keys on a USB jump drive on Mac OS X Part 2</a></li> </ul> <p>Just remember to not make these your ONLY keys, all posable keys should be password encoded and easily revokable so keep a backup and list of your emergency to revoke when it gets lost.</p> <h2>Part Three: The Terminal</h2> <p>I need a sweet terminal so I use zsh with oh-my-zsh and a while bunch of personal mods. Remember the whole lazy part? Yes. Here is the highlights of my zsh configs;</p> <ul> <li>I have my .zsh run <code>workon</code> at the end to list all my virtenvs. It's a nice nag</li> <li>I use ^p and ^n for fuzzy history find and it's amazing <a href="https://github.com/onlyhavecans/dotfiles/blob/master/zsh/keybindings.zsh#L20-L21">dotfiles/zsh/keybindings.zsh at master · onlyhavecans/dotfiles · GitHub</a></li> <li>vi-mode!!!!!</li> </ul> <p>The second major part is tmux. Whatever you are using now… drop it and use tmux. I remapped all my common tmux commands to vi-mode style and C-a for my leader because now ctrl and a are touching. For the full list of my configs which I won't get too deep into check out <a href="https://github.com/onlyhavecans/dotfiles/blob/master/tmux/tmux.conf.symlink">tmux.conf at master · onlyhavecans/dotfiles · GitHub</a>.</p> <p>My main tmux window generally looks like this</p> <div class="highlight"><pre><span></span> ----------------------- | Chat | | | or | | |extra shell| VIM | |-----------| | | | | | IRC |-----------| | | MiniShell | ========================= </pre></div> <p>Chat is my flux buffer that gets changed between a personal chat and second work buffer. IRC is my ever present wee-chat connection. The mini shell is a little shell I keep in the same dir as vim so I can quick run <code>python -m unittest discover module</code> over and over or whatever. When I'm playing with <a href="http://flask.pocoo.org/">Flask</a> it's running there. Depending on where my focus is the vertical split is usually about 65% weighted to the work to squish distractions without cutting them all out or I am on the 11' MacBook Air screen instead of a 20+' external display.</p> <p>I often have a second window but the latest version added <code>C-a z</code> for window zoom and that's GREAT when I really wanna focus on something or blow up the mini-shell while I am debugging something.</p> <h2>Part Four: Into VIM</h2> <p>First and foremost I keep an 8.5x11 copy of <a href="http://vimcheatsheet.com/">Beautiful Vim Cheat-Sheet Poster &amp; Printable Downloads</a> on my desk. It's a nice way to keep reminding me of all the features I NEED to be using and if you don't want to give someone 10USD for it there is a free link right on the page for a low res.</p> <h3>tl;dr the configs</h3> <p><a href="https://github.com/onlyhavecans/dotfiles/tree/master/vim">dotfiles/vim at master · onlyhavecans/dotfiles · GitHub</a></p> <p>A lot of my inital vim config like most was stolen from somewhere but over time I have stripped out everything I didn't adapt in. I started with <a href="http://skwp.github.io/dotfiles/">YADR</a> and then seriously hacked it to death. In the end there is still yadr references but you shouldn't take anything that claims being from yadr in there still is. I'm just lazy about renaming files for scuz.</p> <h3>Highlights</h3> <ul> <li>Setting toggle line numbers to F2 &amp; toggle NERDTree to F3 is heavenly.</li> <li>I use <a href="http://ethanschoonover.com/solarized">Solarized - Ethan Schoonover</a> and the plugin is great</li> <li>I use a lot of markdown but if you use <a href="https://github.com/plasticboy/vim-markdown">plasticboy/vim-markdown · GitHub</a> you need to set an extra setting to kill that damn folding</li> <li><a href="https://github.com/klen/python-mode">klen/python-mode · GitHub</a> is just amazing and I only use a little of it</li> <li>I really miss snippits but I am not yet ready to dive into $SNIPMANAGER-X</li> <li>I'm just now REALLY getting used to the power of <a href="https://github.com/scrooloose/nerdtree">scrooloose/nerdtree · GitHub</a></li> <li>I just got into using <a href="https://github.com/Lokaltog/powerline">Lokaltog/powerline · GitHub</a>. it's really slick looking but I'm really not sold on a second status line</li> <li>I'd love to use <a href="https://github.com/joonty/vdebug">joonty/vdebug · GitHub</a> more but I haven't gotten it to work yet</li> </ul> <p>There you go! I know it feels like I'm skimming the VIM part of the vim writeup but there is really only so much you can do TO VIM itself. It's the development environment you put around it and what you put out with it. Hopefully I will be putting out great things once I learn how to use tags and rope and all that other stuff to get back to ultra fast code sifting and editing.</p> <h2>Part Five: Wishlist</h2> <h3>Auto-running tests</h3> <p>Just something that PyCharm and Komono before that spoiled me on. <code>:w</code> running my tests since I very often TDD would save a lot of window jumping</p> <h3>Snippits</h3> <p>I'll never get deep code intelligence with vim and that's kinda the point but PyCharm saved somewhere around a billion keystrokes when you learned when to hit the auto complete right.</p> <h2>Part Six: Warnings</h2> <p>This allows me to do some awesome stuff and so far I am happy with with it outside of a few small caveats.</p> <ol> <li>It's damn fiddly. So much and learn and fiddle with distracts from the work.</li> <li>Sometimes cruising around inside of vim, inside of tmux can make for some finger dancing that I don't care for; <code>C-a l C-a k C-w l</code>… until I trip over my own keystrokes. <code>C-a ;</code> is really useful when popping between panes when it comes to mind</li> </ol> <h2>Part Seven: Going forward</h2> <p>I can connect in technically from anything I trust enough to plug my key jump-drive into. I currently have bought a <a href="http://www.yubico.com/">YubiKey</a> and am seriously considering switching right over to two-factor OTP which makes me LESS afraid of plugging in the key into something.</p> <p>Another area I am considering going forward with is I technically won't even need my computer to work. I could just work with my iPad and a keyboard! I'm really sure these articles had just a little bit to do with my idea of moving over to all command line vim. I don't know if I am there but it is tempting;</p> <ul> <li><a href="http://yieldthought.com/post/12239282034/swapped-my-macbook-for-an-ipad">I swapped my MacBook for an iPad+Linode</a></li> <li><a href="http://yieldthought.com/post/31857050698/ipad-linode-1-year-later">iPad + Linode, 1 Year Later</a></li> <li><a href="http://yieldthought.com/post/42450188171/working-in-the-cloud">Working in the Cloud</a></li> </ul> <hr /> <p>Was this more in depth than you expected? Do you want more? Lemme know.</p> <div class="footnote"> <hr /> <ol> <li id="fn:YEARS"> <p>See <a href="http://delvarworld.github.io/blog/2013/03/16/just-use-sublime-text/">Just Use Sublime Text - Andrew Ray's Github Blog</a> for details on what I mean by that.&#160;<a class="footnote-backref" href="#fnref:YEARS" rev="footnote" title="Jump back to footnote 1 in the text">&#8617;</a></p> </li> </ol> </div>D.O.S.Thu, 11 Apr 2013 21:53:00 -0700tag:bunnyman.info,2013-04-11:posts/2013/Apr/11/back-to-vim/pythonvimSSH Keys on a USB jump drive on Mac OS X Part 2http://bunnyman.info/posts/2013/Mar/07/ssh-on-usb-on-mac-os-x-scripts/<p>All right! You read my post <a href="http://bunnyman.info/posts/2013/Feb/25/ssh-on-usb-on-mac-os-x/">SSH Keys on a USB jump drive on Mac OS X (Mountain Lion Edition)</a> and want to take this to the next level huh? Maybe having your config posting back to a jump drive and having to have it plugged in <em>every time</em> you want to log into something is sooooo lame! You often just leave it there, plugged in when you walk away from your work station. There has to be a better way…</p> <p><strong>I got you bro</strong></p> <p>What you need to be doing is adding your keys to ssh-agent on demand then pulling your key except for when you REALLY need it. But how do you do that <em>easily</em>?</p> <p><strong>I got you bro</strong></p> <h2>Windows</h2> <p>Lets start with the basics. <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">PuTTY Download Page</a> - Pageant</p> <ul> <li>Download it.</li> <li>Install it.</li> <li>Yes you have to use their crappy ppk so set that up.</li> <li>Start Pageant then load your ppk version of your key.</li> <li>Eject drive.</li> <li>open new session, don't bother manual adding key.</li> <li>Party time</li> <li>Excellent</li> </ul> <p>The cool part is that Pageant remembers your keys so if you pin it to the start menu then it's highlight, over enter, password… you get the point.</p> <p>The shitty part is it keeps that key loaded until you reboot. That's ULTRA fucking weak. Sorry windows. If anyone knows better give me a shout out.</p> <h2>Linux</h2> <p>Linux is easier and way better. Lets assume you do everything in the command line so.</p> <div class="highlight"><pre><span></span>alias loadkey=ssh-add -t 30m /mnt/whatever/ssh/$1 </pre></div> <p>then all you have to do is</p> <div class="highlight"><pre><span></span>loadkey keyname </pre></div> <p>then POW!!! for 30 minutes you have you key loaded. See the 30m in the command? Change that for maximum moddage of commands. Are you a lazy brogrammer slash skriptkiddie and need the time format table?</p> <p>Bro… got… you are… by me</p> <div class="highlight"><pre><span></span>&lt;none&gt; seconds s | S seconds m | M minutes h | H hours d | D days w | W weeks Time format examples: 600 600 seconds (10 minutes) 10m 10 minutes 1h30m 1 hour 30 minutes (90 minutes) </pre></div> <p>Damn! Yea….</p> <h2>Mac</h2> <p>Ok, this is where the gold is. I slaved over a hot mess of applescript to you guys this so feel the love bro. Since it's my Mac and I wanted key exchange to be as easy as possible I pulled out all my scripting to invoke MAXIMUM lazy.</p> <p>Maximum lazy engage!</p> <p>Ok. To start there is no ssh-askpass on Mac OS X Mountain Lion which is fairly un-bro of apple but whatever. I replaced it with an applescript I stole and <em>slightly</em> tweaked to run better. </p> <p>Take this, it's dangerous to go alone. <a href="https://github.com/onlyhavecans/mac-ssh-askpass">onlyhavecans/mac-ssh-askpass · GitHub</a></p> <p>Just put it in ~/Applications like me or /usr/local/bin or where ever makes you warmest and fuzziest inside. Either way don't forget where you put our makeshift ssh-askpass</p> <p>Now break out the applescript editor and take this puppy for a ride.</p> <div class="highlight"><pre><span></span><span class="cm">(*</span> <span class="cm">This key adding mini program indexes the keyfiles on your jump drive</span> <span class="cm">then prompts you for what one you want to load into ssh-agent</span> <span class="cm">You need mac-ssh-addpass for this to work as well</span> <span class="cm">https://github.com/onlyhavecans/mac-ssh-askpass</span> <span class="cm">*)</span> <span class="k">property</span> <span class="nv">keyFolder</span> <span class="p">:</span> <span class="s2">&quot;KEYDRIVE:ssh&quot;</span> <span class="k">property</span> <span class="nv">askPass</span> <span class="p">:</span> <span class="s2">&quot;$HOME/Applications/ssh-askpass&quot;</span> <span class="k">property</span> <span class="nv">keyTime</span> <span class="p">:</span> <span class="s2">&quot;1h&quot;</span> <span class="k">tell</span> <span class="nb">application</span> <span class="s2">&quot;System Events&quot;</span> <span class="k">set</span> <span class="nv">theList</span> <span class="k">to</span> <span class="nb">the</span> <span class="na">name</span> <span class="k">of</span> <span class="nb">every</span> <span class="nb">item</span> <span class="k">of</span> <span class="nv">folder</span> <span class="nv">keyFolder</span> <span class="k">set</span> <span class="nv">theKeys</span> <span class="k">to</span> <span class="p">{}</span> <span class="k">repeat</span> <span class="nv">with</span> <span class="nv">i</span> <span class="k">from</span> <span class="mi">1</span> <span class="k">to</span> <span class="nb">the</span> <span class="nb">count</span> <span class="k">of</span> <span class="nv">theList</span> <span class="k">set</span> <span class="nv">theFile</span> <span class="k">to</span> <span class="p">{</span><span class="nb">item</span> <span class="nv">i</span> <span class="k">of</span> <span class="nv">theList</span><span class="p">}</span> <span class="k">if</span> <span class="p">(</span><span class="nv">theFile</span> <span class="k">as </span><span class="nc">string</span><span class="p">)</span> <span class="ow">ends with</span> <span class="s2">&quot;pem&quot;</span> <span class="ow">or</span> <span class="p">(</span><span class="nv">theFile</span> <span class="k">as </span><span class="nc">string</span><span class="p">)</span> <span class="ow">ends with</span> <span class="s2">&quot;_dsa&quot;</span> <span class="ow">or</span> <span class="p">(</span><span class="nv">theFile</span> <span class="k">as </span><span class="nc">string</span><span class="p">)</span> <span class="ow">ends with</span> <span class="s2">&quot;_rsa&quot;</span> <span class="k">then</span> <span class="k">set</span> <span class="k">end</span> <span class="k">of</span> <span class="nv">theKeys</span> <span class="k">to</span> <span class="nv">theFile</span> <span class="k">end</span> <span class="k">if</span> <span class="k">end</span> <span class="k">repeat</span> <span class="k">set</span> <span class="nv">frontApp</span> <span class="k">to</span> <span class="nv">short</span> <span class="na">name</span> <span class="k">of</span> <span class="nb">first</span> <span class="nv">process</span> <span class="nb">whose</span> <span class="na">frontmost</span> <span class="ow">is</span> <span class="no">true</span> <span class="k">tell</span> <span class="nb">application</span> <span class="nv">frontApp</span> <span class="nb">activate</span> <span class="k">set</span> <span class="nv">theKey</span> <span class="k">to</span> <span class="nb">choose from list</span> <span class="nv">theKeys</span> <span class="nv">with</span> <span class="na">title</span> <span class="s2">&quot;Choose your Destiny&quot;</span> <span class="nv">with</span> <span class="na">prompt</span> <span class="s2">&quot;What Key do you want to activate for &quot;</span> <span class="o">&amp;</span> <span class="nv">keyTime</span> <span class="nv">default</span> <span class="nb">items</span> <span class="p">{</span><span class="nb">first</span> <span class="nb">item</span> <span class="k">of</span> <span class="nv">theKeys</span><span class="p">}</span> <span class="nv">without</span> <span class="nv">empty</span> <span class="nv">selection</span> <span class="nv">allowed</span> <span class="ow">and</span> <span class="nv">multiple</span> <span class="nv">selections</span> <span class="nv">allowed</span> <span class="k">end</span> <span class="k">tell</span> <span class="nb">do shell script</span> <span class="s2">&quot;SSH_ASKPASS=&quot;</span> <span class="o">&amp;</span> <span class="nv">askPass</span> <span class="o">&amp;</span> <span class="s2">&quot; /usr/bin/ssh-add -t &quot;</span> <span class="o">&amp;</span> <span class="nv">keyTime</span> <span class="o">&amp;</span> <span class="s2">&quot; \&quot;&quot;</span> <span class="o">&amp;</span> <span class="p">{</span><span class="nv">POSIX</span> <span class="na">path</span> <span class="k">of</span> <span class="nv">folder</span> <span class="nv">keyFolder</span><span class="p">}</span> <span class="o">&amp;</span> <span class="s2">&quot;/&quot;</span> <span class="o">&amp;</span> <span class="nv">theKey</span> <span class="o">&amp;</span> <span class="s2">&quot;\&quot;&quot;</span> <span class="k">end</span> <span class="k">tell</span> </pre></div> <p>Now pay attention or this will hurt.</p> <p>The keyFolder property is in Apple's format because it just worked better that way. It needs to point to <em>the folder</em> that has all your key files. The format is <code>drive:folder:subfolder:youget:theidea</code>. Now make sure to set that and the location of our new ask-pass. Also because I was a lazy scripter the filter is hardcoded. If your key files end in anything other than <code>.pem</code>, <code>_rsa</code>, or <code>_dsa</code> you are perfectly legit but I hate you anyways and you will need to edit the nasty <code>(theFile as string) ends with blah</code> line.</p> <p>Now... toss this applescript in your scripts folder and set the hotkey ctrl-opt-k in <a href="http://www.red-sweater.com/fastscripts/">FastScripts</a> and if you don't have it then shut up and go buy it in thanks from having this awesomeness rained down upon you… or put it in <a href="http://www.alfredapp.com/">Alfred App</a>... whatever bro; the point is you should be running all your shell and applescripts from the keyboard so do it.</p> <p>Now hit that key command and watch the awesome of the menu box you can arrow through! Select your key of the minute and hit enter! Be amazed at the applescript password prompt.</p> <p>Feel amazing bro. Feel amazing.</p> <h2>Note for those who are curious.</h2> <p>The applescripts are hooking off the frontmost application. IE it's telling whatever app is in front to activate<sup id="fnref:ACT"><a class="footnote-ref" href="#fn:ACT" rel="footnote">1</a></sup> and then display the dialogs for the scripts. So don't bug out because the icon displayed is some "random seeming" app on your system. I do this so that the box is always to front so it can be keyboard operated and drops you right back into your front most app without fuzzing off the focus elsewhere or in some truly random app of my choosing like Finder.</p> <p>I'll probably put this in my GitHub later, or forget and leave it as a blog exclusive so enjoy.</p> <div class="footnote"> <hr /> <ol> <li id="fn:ACT"> <p>I had some weird edge case focus issues and making sure to activate before springing the next dialog box smoothed it all out. Sorry if that has any weirds, it really shouldn't&#160;<a class="footnote-backref" href="#fnref:ACT" rev="footnote" title="Jump back to footnote 1 in the text">&#8617;</a></p> </li> </ol> </div>D.O.S.Thu, 07 Mar 2013 07:50:00 -0800tag:bunnyman.info,2013-03-07:posts/2013/Mar/07/ssh-on-usb-on-mac-os-x-scripts/macUpdate to my Transmission Toolshttp://bunnyman.info/posts/2013/Feb/27/transmission-tools-2013-02-27/<p>Nope, not something to help unmount and flush your transmissions, it's some tools for <a href="http://www.transmissionbt.com/">Transmission</a>, specifically MY tools.</p> <p>I just though I would share that I redid this repository completely and cleaned up the Move &amp; Stop script to cover some possible bugs and be a bit more python modern. If you had any problems with it not moving single files or just wanted some slightly cleaner code go grab the new version.</p> <p>I should really break out TransmissionRequestWrapper into it's own package and distribute that since it's so sweet. Please feel free to use it with some credit.</p> <p><a href="https://github.com/onlyhavecans/Transmission_Tools">onlyhavecans/Transmission_Tools · GitHub</a></p>D.O.S.Wed, 27 Feb 2013 07:10:00 -0800tag:bunnyman.info,2013-02-27:posts/2013/Feb/27/transmission-tools-2013-02-27/pythonbittorrenttransmissionbtSSH Keys on a USB jump drive on Mac OS X (Mountain Lion Edition)http://bunnyman.info/posts/2013/Feb/25/ssh-on-usb-on-mac-os-x/<h2>Here I address the eternal struggle.</h2> <p>I want to store all my private keys on my jump drive I wear around everywhere. I use Win, Linux, but primarily Macs to do to my work so it needs to be some FAT variant formatted. I want to use the absolutely least hacky way.</p> <p>Windows and Linux were easy to overcome. In short for windows you use putty to make a putty key and in linux you do something shockingly similar to what is below… but I get ahead of myself.</p> <p>All the searches in duck duck go and google came up with "Nope! Can't do it! Give up!" for the Mac. All these people are horrible liars and don't want you to succeed. After figuring this out it was REALLY EASY as long as you are terminal competent. If you aren't terminal competent I'm not sure why you read my blog, I'd assume most of my stuff is really flying over your head.</p> <p>As always YMMV and don't copy paste things I write here into the terminal.</p> <h2>tl;dr jump point</h2> <ol> <li>Find your uid with "<code>id -u</code>". 99% of the time it's 501.</li> <li>Double check your drive name with "<code>ls -ln /Volumes</code>".</li> <li>with sudo add a new line to <code>/etc/fstab</code><sup id="fnref:NOT"><a class="footnote-ref" href="#fn:NOT" rel="footnote">1</a></sup><div class="highlight"><pre><span></span>#Drive called iamaKey and user 501 LABEL=iamaKey none msdos -u=501,-m=700 </pre></div> </li> </ol> <p>There is no step 4; eject &amp; replug your key to enjoy ssh keys used directly from drive.</p> <h2>Considerations</h2> <ul> <li> <p>You have to do this on every mac you use. The drive name is always the same but there is a chance the user id is different.</p> </li> <li> <p>If you aren't sure if it worked or are having trouble give another "<code>ls -ln /Volumes</code>" which should look shockingly similar to this if you did it right:</p> <div class="highlight"><pre><span></span>lrwxr-xr-x 1 0 80 1 Feb 25 07:01 Macintosh HD -&gt; / drwx------ 1 501 20 8192 Feb 25 10:17 iamaKey </pre></div> </li> <li> <p>You should REALLY make sure this drive name is unique to this drive for your machine. Any drive with the same name will get grabbed up by this now and if it's not msdos formatted or you don't want this havoc can be had.</p> </li> <li> <p>In a multi-user environment this could likely cause weird edge case problems unless you are using very unique drive names.</p> </li> <li> <p>I'm really sure putting spaces in your drive name will only wreck havoc. However you would assume that having lowercase letters in it would also fail hard but as you can see it works fine for me.</p> </li> <li> <p>if you wanna be <em>really</em> cool then set up your config file on the jump drive as well and then alias keyssh to 'ssh -F /path/to/usb/config' Then that can ALL follow you around, except for on linux since it would mount on media or whatever instead of /Volumes breaking all your paths in the config but then you can just create a symlink anyways and it will work again… or something like that.</p> </li> <li> <p>While not the point of this article yet your OpenPGP, GnuPG, GPG whateverPG, etc keys should also be WAY happier now placed on the jump drive. I believe they also hate being world readable. </p> </li> <li> <p>This may not work in 10.9 or 11 or whatever comes next. The file <code>/etc/fstab.hd</code> says this is on the deprecation list. If Apple does break this down the road and you are reading this from the future the trick is to go looking wherever <code>diskarbitrationd</code> or it's successor is getting it's settings.</p> </li> <li> <p>Final note, if you are going to do all this <em><strong>PLEASE</strong></em> don't use password-less keys. Just don't do it. Especially if you put your config file on the drive too. Then you are just telling people what systems they now have access too. Each key on the drive should have a strong &amp; long passphrase, have it's comment clearly marked as being the jump dive key (on the machines they key is loaded), and should be unique to that jump drive only so it can be easily purged and reissued in case of loss.</p> </li> </ul> <div class="footnote"> <hr /> <ol> <li id="fn:NOT"> <p>On a new 10.8 machine <code>/etc/fstab</code> does not exist. You must create a fresh file as root.&#160;<a class="footnote-backref" href="#fnref:NOT" rev="footnote" title="Jump back to footnote 1 in the text">&#8617;</a></p> </li> </ol> </div>D.O.S.Mon, 25 Feb 2013 10:39:00 -0800tag:bunnyman.info,2013-02-25:posts/2013/Feb/25/ssh-on-usb-on-mac-os-x/macPuppet Configuration Checks with Jenkinshttp://bunnyman.info/posts/2013/Feb/19/puppet_jenkins/<p>Ok, so we have all our Nagios configs being sanitized and checked by Jenkins, why not <a href="https://puppetlabs.com/">Puppet: IT Automation Software for System Administrators</a>? WHY NOT PUPPET!?</p> <p>A lot of this is going to be rehash of the PRIOR article but I wanted to document this out for later anyways since it's slightly different.</p> <h2>Step One: Assumptions and Layout</h2> <p>I'm going to stop and assume we are well past the Jenkins setup phase. Please see the prior article for that… or better yet? make puppet do it for you. That's what it is for.</p> <p>Now Puppet is a system that hold dynamically updated configurations of your everything and Jenkins is a system that automatically runs random code summated to it to validate it. I think needless to say I'm not even going to <em>consider</em> these two pieces of software running on the same machine. I'm serious the answer is NO.</p> <p>Ok, now lets start by assuming the following;</p> <ol> <li>You are not using anything crazy like githubbing puppet configs nor can you afford github enterprise. </li> <li>Puppet Master (puppet.domain.ex) runs in DMZ and is locked down tight.</li> <li><em>/etc/puppet</em> is your config locations on puppet.domain.ex and you have a user that can write to it other than root.</li> <li>Jenkins is hidden away in your network where it belongs, also fairly secured.</li> <li>Your central git server is on the same lan as your Jenkins, if not on the same box for some reason.</li> <li>You solemly swear not to do anything <strong>stupid</strong> and copy paste anything from this document directly into a command prompt. I may toss a bad char in there just to keep you honest.</li> </ol> <p>We have a few caveats to overcome here but it's not impossible.</p> <h2>Step Two: Prepare your Puppet box</h2> <p>Puppet server should be locked down. So for my it's a box with all the screws down tight as they can be, puppet's web port and ssh passworded key to one user only is enabled. In order to allow pushing changes through git we will set up our friend the hub repo.</p> <div class="highlight"><pre><span></span><span class="c1"># Make puppet config directory a git repo</span> <span class="nb">cd</span> /etc/puppet git init git add . git commit -m<span class="s2">&quot;Inital Commit&quot;</span> <span class="c1"># Make a hub repo in home</span> <span class="nb">cd</span> ~ mkdir puppet_configs.git ^mkdir^cd^ git --bare init <span class="c1"># Link and push to our hub</span> <span class="nb">cd</span> /etc/puppet git remote add hub ~/puppet_configs.git git push hub master </pre></div> <p>There! That wasn't hard at all. In fact it was a short rehash of what I did last yesterday. However, lets add the post-merge hook to THIS hub.</p> <div class="highlight"><pre><span></span>cat __EOF__ <span class="c1">#!/bin/sh</span> <span class="nb">cd</span> /etc/puppet <span class="nb">unset</span> GIT_DIR /usr/bin/git pull hub master __EOF__ &gt; ~/puppet_configs.git/hooks/post-merge chmod <span class="m">755</span> ~/puppet_configs.git/hooks/post-merge </pre></div> <p>So now when the hub gets pushed to, puppet gets a fresh load of configs and it does whatever it needs to do from then on out! Yea? Awesome</p> <p>Now get out of your puppet box and STAY OUT (until it breaks, you did set up Nagios on it right?)</p> <h2>Step Three: Jenkins</h2> <p>In case you haven't already Jenkins is going to need a few upgrades. Hit it up with the following plugins.</p> <ul> <li>Warnings Plug-in</li> <li>Jenkins GIT plugin</li> </ul> <p>I have been told you can set up this to work with the RVM plugin to deploy this and that but I took the cheap route since puppet is installed on this machine anyways. For this setup we will need one gem though. If this is for a buisness network I'd go the extra hours to learn RVM but it's not, this is my home lab.</p> <ul> <li>sudo gem install puppet-lint</li> </ul> <p>Now this is where I start to steal heavily from <a href="https://gist.github.com/stephenc/3053561">Continuous Deployment with Jenkins and Puppet</a>.</p> <p>Now starts the puppet configurations!</p> <ul> <li>Name: Puppet</li> <li>Source Code Management: Git<ul> <li>Repositories: Your central git hub, not the one on puppet<sup id="fnref:NOT"><a class="footnote-ref" href="#fn:NOT" rel="footnote">1</a></sup></li> </ul> </li> <li>Trigger Builds Remotely: check<ul> <li>Authentication Token: <em>pick something simple but unique here like 'stopHackingRoot'</em></li> </ul> </li> <li>Poll SCM: check<ul> <li>Schedule: <code>H/15 * * * *</code><sup id="fnref:POLL"><a class="footnote-ref" href="#fn:POLL" rel="footnote">2</a></sup></li> </ul> </li> </ul> <p>On your git repo for puppet you need to add a 'post-update' hook. to trigger builds remotely. Don't forget to sub out YOUR_TOKEN with the token you picked above and set the kenkins server proper. The quick and dirty is;</p> <div class="highlight"><pre><span></span><span class="nb">cd</span> puppet_configs.git/hooks cat __EOL__ <span class="c1">#!/bin/sh</span> <span class="nb">echo</span> <span class="s2">&quot;Sending build command to Jenkins&quot;</span> curl -sSL <span class="s1">&#39;http://mycooljenkins:8080/job/Nagios_Config/build?token=YOUR_TOKEN&#39;</span> &gt;&gt; /dev/null <span class="nb">exec</span> git update-server-info __EOL__ &gt;&gt; post-update chmod <span class="m">755</span> post-update </pre></div> <p>Now lets add two execute shell actions.</p> <p>Build Execute Shell Number one:</p> <div class="highlight"><pre><span></span><span class="k">for</span> file in <span class="k">$(</span>find . -iname <span class="err">&#39;</span>*.pp’<span class="k">)</span> <span class="k">do</span> puppet parser validate <span class="se">\</span> --render-as s <span class="se">\</span> --modulepath<span class="o">=</span>modules <span class="se">\</span> <span class="s2">&quot;</span><span class="nv">$file</span><span class="s2">&quot;</span> <span class="o">||</span> <span class="nb">exit</span> 1<span class="p">;</span> <span class="k">done</span> </pre></div> <p>Build Execute Shell Number two:</p> <div class="highlight"><pre><span></span>find . -iname *.pp -exec puppet-lint --log-format <span class="s2">&quot;%{path}:%{linenumber}:%{check}:%{KIND}:%{message}&quot;</span> <span class="o">{}</span> <span class="se">\;</span> </pre></div> <p>The second one shouldn't error out but it will toss up style warnings and possible errors so lets check for those with our warning plugin.</p> <ul> <li>Post-Build Actions</li> <li>Scan for compiler warnings<ul> <li>Parser: Puppet-Lint</li> </ul> </li> </ul> <h2>Step four: The Danger Zone</h2> <p>Now this is where you might expect me to tell you to set up a Post-Build Action using Git Publisher or some script or another to automate your verified go-live puppet, maybe with a cool mcollector call to speed up your push...</p> <p><strong>That recomendation is NOT forthcoming</strong></p> <p>The simple fact of the matter is that if you are automatically pushing configs to puppet from Jenkins you have;</p> <ol> <li>A passwordless key laying around on a CI box (and any boxes Jenkins spawns) to your puppet config (or worse)</li> <li>Much much bigger balls than me</li> <li>Hopefully a whole enterprise security team all over this shit like a hawk.</li> </ol> <p>You <em>can</em> set up an automated push and hope that everything you or anyone else pushes in master is gold but my recommendation is to test in branches, tag, and then have a human eyes verification on the configs before your push to puppet. When you have a bad push to nagios monitoring glitches out. When pupped fucks up... well you are running down a bad road at full speed. </p> <div class="footnote"> <hr /> <ol> <li id="fn:NOT"> <p>Seriously, if you don't have a central git server set up a central git repo SOMEWHERE safe, even on your jenkins box if need be (like we did for nagios) Just remember that your going to end up with something sensitive in there someday.&#160;<a class="footnote-backref" href="#fnref:NOT" rev="footnote" title="Jump back to footnote 1 in the text">&#8617;</a></p> </li> <li id="fn:POLL"> <p>You still want to regularly poll the git repo regularly just in case a commit script fails, it's no good to have it falling through the cracks.&#160;<a class="footnote-backref" href="#fnref:POLL" rev="footnote" title="Jump back to footnote 2 in the text">&#8617;</a></p> </li> </ol> </div>D.O.S.Tue, 19 Feb 2013 19:32:00 -0800tag:bunnyman.info,2013-02-19:posts/2013/Feb/19/puppet_jenkins/jenkinsBunMailPot Alpha…http://bunnyman.info/posts/2012/Nov/06/bunny-mail-honeypot-alpha/<p>Ok… so that is not the best name I've every come up with. Sorry, but whatever. This is a quick but fun one.</p> <p>I have been collecting malware with my BunnyPot for a while and have been finding some diminishing returns coming to me. I started thinking that I can set up more of these low interaction server honeypots but how can I get even MORE goods? The ability to grab random files pushed to any server seems like a limited way here…</p> <p>Then it hit me, actually dinged me… my email dinged that is.</p> <p>Malware comes through the mail too, duh.</p> <h2>The setup</h2> <p>This is hella… well you will see. It needs some cleaning up and maybe not to be relying on Apple's Mail.App… but seriously it's a super quick and dirty hack. It's not even ON the server, it's on my laptop at the moment.</p> <h3>The mail rule</h3> <blockquote> <p>Ok, I have mail… lots of it, all my work and personal and trash mail all in one app with nice aggressive mail filters… so lets get the malware out!</p> </blockquote> <p>Just make a mail rule that is <strong>all</strong> of the following;</p> <ul> <li>Message is junk Mail</li> <li>Any Attachment name Does not contain <code>.htm</code></li> </ul> <p>Now perform the following action;</p> <ul> <li>Run Applescript <code>~/Library/Scripts/Applications/Mail/MalwareSaveRule.scpt</code></li> </ul> <p>WHAT'S IN THE SCRIPT?! WHAT'S IN THE SCRIPT!!!!!!!</p> <div class="highlight"><pre><span></span><span class="k">on</span> <span class="nv">perform_mail_action</span><span class="p">(</span><span class="nv">ruleData</span><span class="p">)</span> <span class="c">-- The folder to save the attachments in (must already exist)</span> <span class="k">set</span> <span class="nv">attachmentsFolder</span> <span class="k">to</span> <span class="p">((</span><span class="nb">path to</span> <span class="nv">home</span> <span class="nv">folder</span> <span class="k">as </span><span class="nc">text</span><span class="p">)</span> <span class="o">&amp;</span> <span class="s2">&quot;Downloads&quot;</span><span class="p">)</span> <span class="k">as </span><span class="nc">text</span> <span class="c">-- Save in a sub-folder based on the name of the rule in Mail</span> <span class="k">set</span> <span class="nv">subFolder</span> <span class="k">to</span> <span class="na">name</span> <span class="k">of</span> <span class="err">|</span><span class="nv">Rule</span><span class="err">|</span> <span class="k">of</span> <span class="nv">ruleData</span> <span class="k">as </span><span class="nc">text</span> <span class="k">tell</span> <span class="nb">application</span> <span class="s2">&quot;Finder&quot;</span> <span class="k">if</span> <span class="ow">not</span> <span class="p">(</span><span class="nb">exists</span> <span class="nv">folder</span> <span class="nv">subFolder</span> <span class="k">of</span> <span class="nv">folder</span> <span class="nv">attachmentsFolder</span><span class="p">)</span> <span class="k">then</span> <span class="nb">make</span> <span class="nb">new</span> <span class="nv">folder</span> <span class="nb">at</span> <span class="nv">attachmentsFolder</span> <span class="nv">with</span> <span class="na">properties</span> <span class="p">{</span><span class="na">name</span><span class="p">:</span><span class="nv">subFolder</span><span class="p">}</span> <span class="k">end</span> <span class="k">if</span> <span class="k">end</span> <span class="k">tell</span> <span class="c">-- Get incoming messages that match the rule</span> <span class="k">tell</span> <span class="nb">application</span> <span class="s2">&quot;Mail&quot;</span> <span class="k">set</span> <span class="nv">selectedMessages</span> <span class="k">to</span> <span class="err">|</span><span class="nv">SelectedMessages</span><span class="err">|</span> <span class="k">of</span> <span class="nv">ruleData</span> <span class="k">repeat</span> <span class="nv">with</span> <span class="nv">theMessage</span> <span class="k">in</span> <span class="nv">selectedMessages</span> <span class="c">-- Get the date the message was sent</span> <span class="k">set</span> <span class="p">{</span><span class="nb">year</span><span class="p">:</span><span class="nv">y</span><span class="p">,</span> <span class="nb">month</span><span class="p">:</span><span class="nv">m</span><span class="p">,</span> <span class="nb">day</span><span class="p">:</span><span class="nv">d</span><span class="p">,</span> <span class="nv">hours</span><span class="p">:</span><span class="nv">h</span><span class="p">,</span> <span class="nv">minutes</span><span class="p">:</span><span class="nv">min</span><span class="p">}</span> <span class="k">to</span> <span class="nv">theMessage</span>&#39;s <span class="nv">date</span> <span class="nv">sent</span> <span class="k">set</span> <span class="nv">timeStamp</span> <span class="k">to</span> <span class="p">(</span><span class="s2">&quot;&quot;</span> <span class="o">&amp;</span> <span class="nv">y</span> <span class="o">&amp;</span> <span class="s2">&quot;-&quot;</span> <span class="o">&amp;</span> <span class="k">my</span> <span class="nv">pad</span><span class="p">(</span><span class="nv">m</span> <span class="k">as</span> <span class="nv">integer</span><span class="p">)</span> <span class="o">&amp;</span> <span class="s2">&quot;-&quot;</span> <span class="o">&amp;</span> <span class="k">my</span> <span class="nv">pad</span><span class="p">(</span><span class="nv">d</span><span class="p">)</span> <span class="o">&amp;</span> <span class="s2">&quot;-&quot;</span> <span class="o">&amp;</span> <span class="k">my</span> <span class="nv">pad</span><span class="p">(</span><span class="nv">h</span><span class="p">)</span> <span class="o">&amp;</span> <span class="s2">&quot;-&quot;</span> <span class="o">&amp;</span> <span class="k">my</span> <span class="nv">pad</span><span class="p">(</span><span class="nv">min</span><span class="p">))</span> <span class="c">-- Save the attachment</span> <span class="k">repeat</span> <span class="nv">with</span> <span class="nv">theAttachment</span> <span class="k">in</span> <span class="nv">theMessage</span>&#39;s <span class="nv">mail</span> <span class="nb">attachments</span> <span class="k">set</span> <span class="nv">originalName</span> <span class="k">to</span> <span class="na">name</span> <span class="k">of</span> <span class="nv">theAttachment</span> <span class="k">set</span> <span class="nv">savePath</span> <span class="k">to</span> <span class="nv">attachmentsFolder</span> <span class="o">&amp;</span> <span class="s2">&quot;:&quot;</span> <span class="o">&amp;</span> <span class="nv">subFolder</span> <span class="o">&amp;</span> <span class="s2">&quot;:&quot;</span> <span class="o">&amp;</span> <span class="nv">timeStamp</span> <span class="o">&amp;</span> <span class="s2">&quot; &quot;</span> <span class="o">&amp;</span> <span class="nv">originalName</span> <span class="k">try</span> <span class="nv">save</span> <span class="nv">theAttachment</span> <span class="k">in</span> <span class="nv">savePath</span> <span class="k">end</span> <span class="k">try</span> <span class="k">end</span> <span class="k">repeat</span> <span class="k">end</span> <span class="k">repeat</span> <span class="k">end</span> <span class="k">tell</span> <span class="k">end</span> <span class="nv">perform_mail_action</span> <span class="c">-- Adds leading zeros to date components</span> <span class="k">on</span> <span class="nv">pad</span><span class="p">(</span><span class="nv">n</span><span class="p">)</span> <span class="no">return</span> <span class="nb">text</span> <span class="o">-</span><span class="mi">2</span> <span class="nb">thru</span> <span class="o">-</span><span class="mi">1</span> <span class="k">of</span> <span class="p">(</span><span class="s2">&quot;00&quot;</span> <span class="o">&amp;</span> <span class="nv">n</span><span class="p">)</span> <span class="k">end</span> <span class="nv">pad</span> </pre></div> <p>Simple ya? Nothing fancy, quick and kinda diiiirty. When this runs it creates a folder in your downloads that matches the name of the mail rule you created. I went with the hell creative <em>Malware From Junk</em></p> <h2>Processing the malware</h2> <p>Just like every other <em>this is how I process files</em> thing I have written up this part is all in <a href="http://www.noodlesoft.com/">Hazel</a>. Seriously I can't praise this app enough. Go pay this guy money. Stop reading this, go buy, use, love, live.</p> <p>We add our folder <em>which you remember is named after your mail rule</em> to be watched by hazel… now lets start with the goods</p> <p>Oh and disable Throwing away duplicate files, it might accidentally toss a variant… md5 will hash it down to what is and isn't the same.</p> <h3>Uncompress</h3> <blockquote> <p>This is too easy</p> </blockquote> <p>If</p> <ul> <li>Kind is Archive</li> </ul> <p>Do</p> <ul> <li>Uncompress</li> </ul> <h3>Rename exe's to md5 and send to repo</h3> <blockquote> <p>Still really easy. The only trick is I set the rename and the upload to two separate scripts and actions so the whole thing can be halted easily in case something fails.</p> </blockquote> <p>If</p> <ul> <li>Extension is <code>exe</code></li> </ul> <p>Do</p> <ul> <li> <p>Run Shell script embedded script</p> <div class="highlight"><pre><span></span><span class="nv">newname</span><span class="o">=</span><span class="k">$(</span>md5 -q <span class="s2">&quot;</span><span class="nv">$1</span><span class="s2">&quot;</span><span class="k">)</span> mv <span class="s2">&quot;</span><span class="nv">$1</span><span class="s2">&quot;</span> <span class="s2">&quot;</span><span class="nv">$newname</span><span class="s2">&quot;</span> </pre></div> </li> <li> <p>Run Shell script embedded script</p> <div class="highlight"><pre><span></span>curl -sS -F <span class="nv">upfile</span><span class="o">=</span>@<span class="s2">&quot;</span><span class="nv">$1</span><span class="s2">&quot;</span> http://your.home.server:9000/cgi-bin/dionaea.py </pre></div> </li> <li> <p>Display Growl Notification "New MailMal (file)"</p> </li> </ul> <h2>Notification</h2> <p>Ok, I'm not going to teach you how to set up growl to notify your phone for when you move this to your mac mini server at home, but needless to say <a href="http://prowlapp.com/">Prowl - iOS Push Notifications</a> is your friend. If you sent up the receiver I talked about in the last bunnypot article then you should already have that dionaea.py already to go!</p> <h2>Next steps</h2> <p>Next I need to find out how to get an email or even an entire domain onto as many spam lists as possible…</p> <p>Feel free to send donations or suggestions to <a href="mailto:free_mal_pleez@bunnyman.info">free_mal_pleez@bunnyman.info</a></p>D.O.S.Tue, 06 Nov 2012 15:16:00 -0800tag:bunnyman.info,2012-11-06:posts/2012/Nov/06/bunny-mail-honeypot-alpha/macmalwaresimpliFiRE.IDAscope API browsing on a Machttp://bunnyman.info/posts/2012/Oct/30/idascope-winapi-browsing-on-a-mac/<p>I know this isn't the most revolutionary tip ever but my google searches pulled up nada when I tried to figure this out. I'm an IDA Pro MAC user. Bastard child of IDA right? Not really, except for plugins usually which is the point of this short tips post.</p> <p>If you are using <a href="https://bitbucket.org/daniel_plohmann/simplifire.idascope">simpliFiRE.IDAscope</a> to help you dig through malware you are collecting with your bunnypot (and gods why aren't you?) you will bang against the WinAPI browser whining about the following error while searching for native windows calls<sup id="fnref:VERSION"><a class="footnote-ref" href="#fn:VERSION" rel="footnote">1</a></sup></p> <div class="highlight"><pre><span></span>Well, something has gone wrong here. Try again with some proper API name. Exception: [Errno 2] No such file or directory: &#39;C:/WinAPI/fs/createfile.htm&#39; </pre></div> <p>While not directly documented the fix is <em>really</em> easy. Just tweak your <code>config.json</code> file in the IDAscope folder.</p> <div class="highlight"><pre><span></span><span class="s2">&quot;winapi&quot;</span><span class="err">:</span> <span class="p">{</span> <span class="nt">&quot;search_hotkey&quot;</span><span class="p">:</span> <span class="s2">&quot;ctrl+y&quot;</span><span class="p">,</span> <span class="nt">&quot;load_keyword_database&quot;</span><span class="p">:</span> <span class="kc">false</span><span class="p">,</span> <span class="nt">&quot;online_enabled&quot;</span><span class="p">:</span> <span class="kc">true</span> <span class="p">}</span> </pre></div> <p>After you do this don't even restart IDA, just close the IDAscope tab and rerun the script. This trick comes with another fringe benefit; IDAscope will load in a <em>flash</em> compared to the normal 30 second running, wait, almost... there... OK. The only disadvantage is that each search is now a web lookup but I don't think that's a horrible situation.</p> <p>Now if I can only get the hotkey working right…</p> <p>Happy hunting!</p> <div class="footnote"> <hr /> <ol> <li id="fn:VERSION"> <p>Of course I am assuming you are using version 1.0b (Released Oct 2012) or later, Otherwise you don't even have the ability.&#160;<a class="footnote-backref" href="#fnref:VERSION" rev="footnote" title="Jump back to footnote 1 in the text">&#8617;</a></p> </li> </ol> </div>D.O.S.Tue, 30 Oct 2012 19:29:00 -0700tag:bunnyman.info,2012-10-30:posts/2012/Oct/30/idascope-winapi-browsing-on-a-mac/idamacGit-Fu Advicehttp://bunnyman.info/posts/2012/Sep/11/git-fu-02/<p>Now who would have thought, I start blogging about git and people have advice. This post isn't just my personal learning but also some advice I received from others!</p> <div class="highlight"><pre><span></span>git reset HEAD^ </pre></div> <blockquote> <p>From Alexis: Something I'm doing a lot is when I mess up with git, I sometimes need to uncommit something but keep the changes I had just before the commit.</p> </blockquote> <div class="highlight"><pre><span></span>git add -i </pre></div> <blockquote> <p>From Alexis: "Use this…" Brief but powerful advice. I never thought of using the interactive mode personally but if you are doing a complex commit or want to double over your work git's interactive mode is fairly robust.</p> </blockquote> <div class="highlight"><pre><span></span><span class="nb">cd</span> my_git_repo <span class="nb">echo</span> <span class="s1">&#39;git push&#39;</span> &gt; .git/hooks/post-commit chmod <span class="m">755</span> .git/hooks/post-commit </pre></div> <blockquote> <p>I mentioned this in an earlier post. This hook trick is for the lazy at heart. This script runs a push after every commit. If you always have access to your origin repo when you are coding, ie like you are a cubicle worker, this might not be too bad. This might get annoying of you are the type of coder that likes to write a lot of little commits on the road and then push in bundles.</p> </blockquote> <div class="highlight"><pre><span></span> git diff --cached [--ext-diff] </pre></div> <blockquote> <p>As mentioned in my last post I'm big for double-checking my commits before go. This long command (that deserves an alias) pops open a diff of everything in your index ready to commit. Always a quick check before proceed!</p> </blockquote>D.O.S.Tue, 11 Sep 2012 15:05:00 -0700tag:bunnyman.info,2012-09-11:posts/2012/Sep/11/git-fu-02/gitFun with Git, Jenkins, & Nagioshttp://bunnyman.info/posts/2012/Sep/07/git-jenkins-nagios/<p>Welcome to another edition on how to automate the hell out of your workflow.</p> <h2>Preface</h2> <p>One thing I have been addicted to since I learned it was source control. I don't understand how some developers work without it... and I <strong>really</strong> don't understand how any syadmins live without it. I have actually found it <em>more</em> useful as a sysadmin as a programmer, but only because at my day job I have used it in most of our major configs. Putting our 400+ file bind setup in subversion and using hooks to test and deploy our changes was not only a massive time saver but tail saver as well.</p> <p>Another system that gets plenty of additions or tweaks is our <a href="http://www.nagios.org/">Nagios</a> configuration. Server gets deployed? Nagios. New services? Nagios. Something gets moved? Nagios. The list goes on.</p> <p>The problem is that at work the Nagios commits aren't so automated. You push to the SVN server, then go to the nagios box and then checkout to test your changes. This results in extra commits to fix breaks and just <em>work</em>. There doesn't need to be work!</p> <h2>Getting to the point</h2> <p>The goal is to set up Nagios to have all it's configurations in git. Then I want Jenkins CI to test my commits automatically and push to production if they are solid! This was shocking easy to do with just a few gotcha's. I put this entire setup together in about a few hours, so expect possible areas of improvement.</p> <h3>Step one: Get your install on.</h3> <p>Install <a href="http://www.nagios.org/">Nagios</a> and git. I'm not even gonna get into this, also if you haven't already throw java on the box. I'm going to demonstrate how to do everything on one box but it should be easy to break everything out onto multiple systems where needed.</p> <p><a href="http://jenkins-ci.org/">Jenkins</a> might seem intimidating because it's java but it's not, really. I don't even bother with package installers, just grab the .war file from the website and <code>java --jar jenkins.war</code><sup id="fnref:SECURITY"><a class="footnote-ref" href="#fn:SECURITY" rel="footnote">1</a></sup>. You might want to set up an init script and play with all the features but I'm not going to cover that, it's all well documented on <a href="http://jenkins-ci.org/">Welcome to Jenkins CI!</a>. If you are setting this up on a mac server, I tend to steal my LaunchAgent plists from <a href="http://mxcl.github.com/homebrew/">Homebrew</a></p> <p>For simplicities sake, or to mimic me, set up jenkins running as the same user as nagios. In my case I'm going to give nagios it's own dedicated jenkins that can only be accessed by private IPs.</p> <h3>Step two: Git-fu</h3> <p>This was the tricky part but it will seem easy when we are done.</p> <p>Start by initing your nagios configs;</p> <div class="highlight"><pre><span></span><span class="nb">cd</span> /usr/local/etc/nagios git init git add . git commit -m<span class="s2">&quot;initial import of Nagios Configs&quot;</span> </pre></div> <p>Now you will want to set up the "hub" repo. For sakes of simplicity I'm setting it up in Nagios' home directory but as long as Jenkins and you can reach it then you are solid.</p> <div class="highlight"><pre><span></span><span class="nb">cd</span> ~ mkdir nagios_configs.git ^mkdir^cd^ git --bare init </pre></div> <p>Now we clone over our working data to the "hub";</p> <div class="highlight"><pre><span></span><span class="nb">cd</span> /usr/local/etc/nagios git remote add hub ~/nagios_configs.git git push hub master </pre></div> <p>While we are in the nagios config directory lets script a hook so that when this repo pulls and updates its configs from the hub it automatically reloads nagios.</p> <div class="highlight"><pre><span></span><span class="nb">cd</span> .git/hooks vim post-merge <span class="c1">#!/bin/sh</span> <span class="nb">echo</span> Running <span class="s1">&#39;killall -HUP nagios&#39;</span> to reload settings <span class="nb">exec</span> killall -HUP nagios :wq chmod <span class="m">755</span> post-merge </pre></div> <p>Now leave this repo/directory and NEVER RETURN unless you break the hell out of the repo.</p> <p>Now we have enough so that you can clone the hub repo and work on your nagios configs on your local workstation git style before pushing them back to your git hub... HA! See what I did there? Sorry...</p> <p>Now what about testing?! and automation!? How does the data get from hub back to your nagios configs? Well this is where Jenkins comes in.</p> <h3>Step Three: Putting Jenkins to work</h3> <p>First you need the Jenkins git plugin. Jenkin's plugins are quick and easy. I'll shortcut you to it just for completion;</p> <ul> <li>Go to http://nagiosbox:8080/</li> <li>Click on <code>Manage Jenkins</code></li> <li>Click <code>Manage Plugins</code></li> <li>Click the <code>Availible</code> tab</li> <li>Search for and select the <code>Jenkins GIT plugin</code></li> <li>Click <code>Download now and install after restart</code></li> </ul> <p>Jenkins; It's just that easy. Now lets set up our tests and deploy!</p> <ul> <li>From the dashboard click <code>New Job</code>.</li> <li>Project Name: <code>Nagios_config</code><sup id="fnref:CAREFUL"><a class="footnote-ref" href="#fn:CAREFUL" rel="footnote">2</a></sup></li> <li>Description: Whatever, not really important</li> <li>Check <code>Discard old builds</code></li> <li>Set <code>Max # of builds to keep</code> to something reasonable like 5 or 20</li> <li>Under <code>Source Code Management</code> check <code>Git</code></li> <li>Repository URL: is <code>$HOME/nagios_configs.git</code> or wherever you put this<sup id="fnref:TILDE"><a class="footnote-ref" href="#fn:TILDE" rel="footnote">3</a></sup></li> <li>Set <code>Branches to build</code> to <code>**</code></li> <li>Under <code>Build Triggers</code> you want to check <code>Trigger builds remotely</code></li> <li>You'll need to pick a token; I recommend keeping it simple but not guessable like <code>caronLovesBronies</code></li> <li>I like to also set <code>Poll SCM</code> and set something like <code>*/30 * * * *</code> just in case something doesn't get triggered. I don't think it's necessary though.</li> <li>Under <code>Build</code> click the <code>Add Build Step</code> drop down and select <code>Execute shell</code></li> <li>Now we have our box to type our Nagios config Test, <code>/usr/local/bin/nagios -v nagios.cfg</code></li> </ul> <p>Technically that is all the Jenkins config we need to have it automatically clone the hub to it's own private repo and then nagios -v to test the config. All typed out it seems like a decent amount of steps but by the time you set up your third Jenkin's test you realize most all of that is boilerplate. Most of the time you spend with Jenkin's is checking to see why your build failed and sometimes tweaking tests for the environment. It's really a get set up and get out of your way kinda tool.</p> <p>Now BEFORE we move on let's make Jenkin's do a little extra work and deploy from the hub to the live configs if the tests pass... oh crap you clicked save already didn't you... If you did just go back to the project and hit <code>Configure</code>. </p> <p>Now Under <code>Build</code> click <code>Add Build Step</code> and add a <em>second</em> <code>Execute Shell</code>. Then put the following unto it<sup id="fnref:GITPULL"><a class="footnote-ref" href="#fn:GITPULL" rel="footnote">4</a></sup></p> <div class="highlight"><pre><span></span><span class="nb">cd</span> /usr/local/etc/nagios <span class="nb">unset</span> GIT_DIR /usr/local/bin/git pull hub master </pre></div> <p><strong>Now</strong> you can hit save</p> <p>To finish off our super automation let's make it so that when anyone pushes to the hub it instantly triggers a build, test, and if the tests passes deploy. Let's just jump back to the command line to add a hook to our hub repo now</p> <div class="highlight"><pre><span></span><span class="nb">cd</span> ~/nagios_configs.git/hooks vim post-update <span class="c1">#!/bin/sh</span> <span class="nb">echo</span> <span class="s2">&quot;Sending build command to Jenkins&quot;</span> curl -sSL <span class="s1">&#39;http://localhost:8080/job/Nagios_Config/build?token=YOUR_TOKEN&#39;</span> &gt;&gt; /dev/null <span class="nb">exec</span> git update-server-info :wq chmod <span class="m">755</span> post-update </pre></div> <p>Note that with the curl line, if you enable authentication on jenkins you will need to create a user that has "build" level permissions and put it into that line. Also replace my example token with yours.</p> <p>All right! Now we have it so that using ssh you can clone the hub repo and work on it. When you push back to hub it triggers Jenkins to build the tests. Then jenkins will take a copy, run <code>nagios -v</code> to test it, and if it passes it will tell the live config to pull the new updates... and once that is done the live config <code>-HUP</code>s nagios for us.</p> <p>AMAZING!!! But not done yet.</p> <h3>Step Four: Final Boss^WConfigs</h3> <p>Ok. This might seem just about perfect but there is a catch. The default Nagios config uses absolute pathing to all of it's files. This means we need to modify some of Nagios' configs to properly allow Jenkin's testing to read all the proper files.</p> <p>This process <em>should</em> be as easy as taking all the links at the top of the <code>nagios.cfg</code> file and just making them relative to the main config. For example, here is the head of my config minus comments;</p> <div class="highlight"><pre><span></span>$ egrep <span class="s1">&#39;^[^#]&#39;</span> nagios.cfg <span class="p">|</span> head <span class="nv">log_file</span><span class="o">=</span>/usr/local/var/lib/nagios/nagios.log <span class="nv">cfg_file</span><span class="o">=</span>objects/commands.cfg <span class="nv">cfg_file</span><span class="o">=</span>objects/contacts.cfg <span class="nv">cfg_file</span><span class="o">=</span>objects/timeperiods.cfg <span class="nv">cfg_file</span><span class="o">=</span>objects/templates.cfg <span class="nv">cfg_dir</span><span class="o">=</span>systems <span class="nv">object_cache_file</span><span class="o">=</span>/usr/local/var/lib/nagios/objects.cache <span class="nv">precached_object_file</span><span class="o">=</span>/usr/local/var/lib/nagios/objects.precache <span class="nv">resource_file</span><span class="o">=</span>/usr/local/etc/nagios/resource.cfg <span class="nv">status_file</span><span class="o">=</span>/usr/local/var/lib/nagios/status.dat </pre></div> <p>Notice the gotcha in there!!! This one stuck me up for about two hours. <strong>I was unable to get Nagios to accept any relative path for the <code>resource.cfg</code> file.</strong> This introduces it's own gotcha but most people don't need to edit this too frequently.<sup id="fnref:READ"><a class="footnote-ref" href="#fn:READ" rel="footnote">5</a></sup></p> <p>To explain a few other lines;</p> <div class="highlight"><pre><span></span><span class="nv">cfg_file</span><span class="o">=</span>objects/commands.cfg <span class="nv">cfg_file</span><span class="o">=</span>objects/contacts.cfg <span class="nv">cfg_file</span><span class="o">=</span>objects/timeperiods.cfg <span class="nv">cfg_file</span><span class="o">=</span>objects/templates.cfg <span class="nv">cfg_dir</span><span class="o">=</span>systems </pre></div> <p>This is referring to /usr/local/etc/nagios/objects. I store all the default config files in there, commands, contacts, time periods, ect.. However I choose to put all my actual system, switch, &amp; device configs in <code>systems</code>. I store personal templates and copies of all the defaults for reference in <code>templates</code> and then when I want to add a new group of systems I just copy a template to <code>systems</code> and fill it out. No need to edit the <code>nagios.cfg</code> every time.</p> <p>Here is the layout of my nagios config directory;</p> <div class="highlight"><pre><span></span>$ tree nagios_configs nagios_configs ├── cgi.cfg ├── htpasswd.users ├── nagios.cfg ├── objects │   ├── commands.cfg │   ├── contacts.cfg │   ├── templates.cfg │   └── timeperiods.cfg ├── resource.cfg ├── systems │   ├── chunkhost.cfg │   ├── lazylopranch.cfg │   └── shells.cfg └── templates ├── printer.cfg ├── switch.cfg └── windows.cfg </pre></div> <h2>The End?</h2> <p>So there you go! It's not perfect because of the listed caveats below. Someone malicious or even a sysop who is ignorant of the fragilities of the system can break it fairly easily trying to be tricky or cool. You could get around most of the git merge conflicts problems with hooks though.</p> <p>The cool part though is this system is FAST. On a good build I push a change, by the time I can get to the web page to check the build it's already deployed to production.</p> <p>There will probably be a follow up when I figure out how to make the setup a bit more solid, this really was a few hours of hack.</p> <p>If you think I've missed anything feel free to drop me a comment.</p> <h3>Bonus points</h3> <h4>Got someone who doesn't get git and can't remember to push? Hate the extra command?</h4> <p>Go into your personal repo and make git a little more SVN, for better or worse.</p> <div class="highlight"><pre><span></span><span class="nb">cd</span> my_nagios_configs <span class="nb">echo</span> <span class="s1">&#39;git push&#39;</span> &gt; .git/hooks/post-commit chmod <span class="m">755</span> .git/hooks/post-commit </pre></div> <h4>How do you feel about circular dependencies?</h4> <p>If they are your thing then use the <a href="https://github.com/jonlives/nagios-jenkins-plugin">Nagios Jenkins Plugin</a> to make Nagios check Jenkins and throw up alerts when your Nagios configs fail their tests!</p> <h3>Caveats</h3> <h4>Never use git push --force</h4> <p>If you ever <em>ever</em> <strong>EVER</strong> <em><strong>EVER</strong></em> do anything that requires a <code>git push --force</code> on hub like an <code>--amend</code> then may god have mercy on your soul. You know how they tell you that <code>push --force</code> is bad and breaks things when you first learned git? This is that exact use case where it ruins everything. Just don't do it, the point of nifty automation is to make your life easier. Suck it up and let your tree be nice and linear, have mistakes, and be "bloated"; Git has some great storage ratios across lots of minor commits.</p> <h4>The test links to the prod version of resource.cfg</h4> <p>You are always testing against the live version of <code>resource.cfg</code>, which will usually be the HEAD^ version but if you break the build it could be even farther off. If you break the build on the resource.cfg file, the bad version will push, nagios will fail to restart properly, and then your NEXT build will fail in Jenkins and refuse to push so you will have to go into the server, test by hand, and then pull from hub manually. <em><strong>DAMN IT</strong></em>. I consider this to be a fairly major flaw that prevents me from wanting to deploy this in a professional environment.</p> <div class="footnote"> <hr /> <ol> <li id="fn:SECURITY"> <p>You'll want to set up authentication, general security, and maybe even want to restrict access by firewall to jenkins in the long run. Jenkins is a well tested system but left unsecured and open on the internet this system can be invoked to execute arbitrary code in a snap.&#160;<a class="footnote-backref" href="#fnref:SECURITY" rev="footnote" title="Jump back to footnote 1 in the text">&#8617;</a></p> </li> <li id="fn:CAREFUL"> <p>I've noticed that if you put a space in your Jenkins project name it puts a space in the path to the "workspace" that Jenkins uses to test and deploy from. This can break things from time to time so to error for safe sides don't do this.&#160;<a class="footnote-backref" href="#fnref:CAREFUL" rev="footnote" title="Jump back to footnote 2 in the text">&#8617;</a></p> </li> <li id="fn:TILDE"> <p>Don't use a tilde in Jenkins paths. It doesn't like them even a little bit. It probably has to do with it's cross system compatibility.&#160;<a class="footnote-backref" href="#fnref:TILDE" rev="footnote" title="Jump back to footnote 3 in the text">&#8617;</a></p> </li> <li id="fn:GITPULL"> <p>You might be wondering why we have Jenkins go into the live config and run a pull from hub instead of pushing the configs to the live repo but that's just a nuance of git and most version controls that I have used. They don't like having things 'pushed' into them if they have a working copy. Only pulls will properly grab the changes and merge them into the working copy. That's why the hub we have uses the <code>--bare</code> flag. If You go to check out the hub repo you will see that it instead has the normal contents of .git just lying around instead of the normal files.&#160;<a class="footnote-backref" href="#fnref:GITPULL" rev="footnote" title="Jump back to footnote 4 in the text">&#8617;</a></p> </li> <li id="fn:READ"> <p>Yes I consider this be a major flaw, read the <code>CAVEATS</code> section.&#160;<a class="footnote-backref" href="#fnref:READ" rev="footnote" title="Jump back to footnote 5 in the text">&#8617;</a></p> </li> </ol> </div>D.O.S.Fri, 07 Sep 2012 11:04:00 -0700tag:bunnyman.info,2012-09-07:posts/2012/Sep/07/git-jenkins-nagios/gitjenkinsHoning my Git-Fu Part 1http://bunnyman.info/posts/2012/Aug/29/git-fu-01/<h2>Backstory</h2> <p>My git-fu sucks. I have to use an awesome git tool called <a href="http://www.sourcetreeapp.com/">SourceTree</a> to do the git wizardry that I do. It's totally free and for the Mac so if you want to just jump into git and have expert features clicks away go download this. I bought it back when it cost money but now you can have it for free. I'll wait…</p> <p>Anyways, I've been rolling around in the lap of GIT/SourceTree luxury these past months; clicking away and using features I only wished SVN could ever touch. However when jumping around between machines and VMs it would be faster to just use the command line. Now a days I'm now on the development team of a well sized open source project and having to fumble around git &amp; github while testing submissions and making patches to help other people test is just NOT COOL. I think it all came to a head when the main project maintainer started flaunting some of his git-fu when submitting and fixing patches… well honestly since I just love cramming as much into my head as possible I thought I would hone my git foo.</p> <p>Now back when I bought the <a href="http://shop.oreilly.com/product/0636920017462.do">McCullough and Berglund on Mastering Git - O'Reilly Media</a> video's while they were on stupid sale and decided to double up with the newly released version of <a href="http://shop.oreilly.com/product/0636920022862.do">Version Control with Git, 2nd Edition - O'Reilly Media</a>. Time to get my learn on.</p> <p>What? Studying DISASM, Developing software, working a full time job AND now deep studying a VCS is too much? PISH, I'm single and have the time.</p> <h2>The point</h2> <p>SnowLprd wanted me to get some documenting on and take notes on what I find useful. Over the next month or so I am going to litter this blog with some posts on the "next steps" for git. While I organize my thoughts and really get my git-fu on it may be a bit all over the place. Sorry to anyone who finds this too rudimentary at points but I am going to try to focus on skimming the core concepts while posting lots of gotcha real world commands and why you would use them.</p> <h2>Starter Commands</h2> <p>I'm not gonna put up how to clone a repo here. SRSLY if you haven't gotten past 101 I'm not going to be useful. This is supposed to be 105b.</p> <div class="highlight"><pre><span></span>git remote set-url origin git@github.com:onlyhavecans/pelican.git git remote add upstream git://github.com/getpelican/pelican.git git remote add MyExBF git://github.com/justinmayer/pelican.git </pre></div> <blockquote> <p>Ok, so this one could be obvious but double check to make sure you have everything linked properly. You want the the R/W link to any repos you are pushing to. You might want to change your auth or connect style if you've say… been made a repo maintainer. For sakes of safety/neatness you should still treat your upstream as R/O and make all your changes in push requests and patches. Also add the R/O of your major contributors and co-developers so you can test their patches easier.</p> </blockquote> <div class="highlight"><pre><span></span>git pull upstream master &amp;&amp; git push origin </pre></div> <blockquote> <p>There really should be a shortcut in this for git. Maybe I'll discover it later. I don't do my work on getpelican/pelican, I have the onlyhavecans/pelican fork! Each time I want to work on something I branch, code, commit, push, pull-request. It's an endless cycle. I never really touch my master, I just want to keep it up to date with the upstream. I don't know an amazing shortcut for that so the above micro shell script does the trick.</p> </blockquote> <div class="highlight"><pre><span></span>git push origin --delete &lt;branchname&gt; </pre></div> <blockquote> <p>I branch for every single patch to maintain tree neatness… however this becomes ugly fast on a good code month. This quickly dumps a branch and deletes it from github. Don't do this before it's been merged into master though, you are asking for pain the first time you make that mistake. Try to remember, branches aren't too expensive disk-wise so don't g too crazy on deleting them.</p> </blockquote> <div class="highlight"><pre><span></span>git add -p &lt;file||.&gt; </pre></div> <blockquote> <p>Don't add whole files to your staging area! Jeez! Who does that anymore! Be 37337 and review every change you make as you add to staging by committing at the <em>patch level</em> instead of at the <em>file level</em> by using the -p flag</p> </blockquote> <div class="highlight"><pre><span></span>git log HEAD^^ -p </pre></div> <blockquote> <p>This one took me a minute to figure out. So <code>git show</code> shows the patch for the <em>last</em> commit with patch if applicable but what happens when I want to spew the patches from the last three commits on someone else's branch to get a quick idea of what they are fuffng up? This one! Don't blindly follow my <code>^^</code> syntax either, learn about it below.</p> </blockquote> <div class="highlight"><pre><span></span>git commit --amend -c HEAD &amp;&amp; git push --force </pre></div> <blockquote> <p>Ok, for bigger things --fixup or --squash might be better but when you open up a PR and instantly realize you are a total moron and everyone is gonna see how dumb your are because of your misspelling/typo/misscommited line… this squished one liner will recommit your quickly staged fix (letting you tweak the commit message in case that's your problem too) and replace your commit in the Pull Request with this much more awesome one.</p> </blockquote> <h2>Concepts to think of</h2> <div class="highlight"><pre><span></span>Revision bad4dad </pre></div> <blockquote> <p>All revisions are named with SHA-1's of the actual commit contents. Then it uses something called treeish to sparse that down to the first 5-8 unique (to the repo) hex. That's why your commit's name is <code>bad1dea</code>. Obviously since repo's are distributed there is no way to create linear counters so all repo's are actually a <strong>linked list</strong> of commits. Everything from branches, to tags, to HEAD is just pointers to SHA-1.</p> </blockquote> <div class="highlight"><pre><span></span>HEAD^ </pre></div> <blockquote> <p>Now then what's the <code>^</code>? Well everyone knows <code>HEAD</code> is an alias to the most recent commit. Well you can add the <code>^</code> to any repo name and it's now the previous one. So <code>bad1dea^</code> means the previous bad idea, while <code>HEAD^</code> literally just means the previous commit. What's better is it's stackable <code>HEAD^^</code> is two back. Now you probably don't wanna stack 10 <code>^</code>'s so just use the shorthand <code>HEAD~10</code> for ten revisions back.</p> <p>Ahhh? History is a Linked list! so this traverses the linked list and returns all the revisions! Good for putting together a change log. To just see the last two commits <code>git log HEAD^..HEAD</code> Yea? Thats the cool stuff. </p> </blockquote>D.O.S.Wed, 29 Aug 2012 21:26:00 -0700tag:bunnyman.info,2012-08-29:posts/2012/Aug/29/git-fu-01/gitBunnyPot Alphahttp://bunnyman.info/posts/2012/Aug/04/bunnypot/<p>Since the beginning of the year I have been mildly obsessed with reversing and malware. Studying ASM and low level debugging is put an awesome edge on my understanding of computer science, programming, and hacking in general.</p> <p>A week or so ago I started reading the <a href="http://search.barnesandnoble.com/Malware-Analysts-Cookbook-and-DVD/Michael-Ligh/e/9780470613030">Malware Analyst's Cookbook and DVD: Tools and Techniques for Fighting Malicious Code</a> where they recommend you build up a honeypot to collect malware. Of course I can't a simple suggestions and set up a normal honeypot; Being a SysAdmin at heart I have to <em>automate the hell</em> out of everything.</p> <p><strong>If you aren't interested in the scripts or the setup just scroll down for the iPhone pic money shot.</strong></p> <h2>Thus is born BunnyPot 0.5</h2> <p>I started with a Ubuntu VPS, patched but lightly hardened. Obviously being a honeypot the system has to be quasi-disposable.</p> <p>Setting up dionaea was the <strong>hardest part</strong>!! <em>Seriously</em>. The install directions for it are fucked and the whole thing just feels like a one man hack job, however it has the cool features that I want to play with. I wrote up a little batch script that SHOULD one-shot install it. Just like the original install instructions some of the versions might disappear/break so some of the fetch instructions may break and meed to be tweaked. While this script is dirty it's smart enough to exit with error if it fails to download or decompress a file. However if you run it outside of sudo it will fail in ugly ways. Standard disclaimer applies; never run random scripts off the internet without vetting them yourself.</p> <div class="highlight"><pre><span></span><span class="ch">#!/bin/sh</span> aptitude install libudns-dev libglib2.0-dev libssl-dev libcurl4-openssl-dev <span class="se">\</span> libreadline-dev libsqlite3-dev python-dev <span class="se">\</span> libtool automake autoconf build-essential <span class="se">\</span> subversion git-core <span class="se">\</span> flex bison <span class="se">\</span> pkg-config p0f mkdir /opt/dionaea <span class="c1"># liblcfg (all)</span> git clone git://git.carnivore.it/liblcfg.git liblcfg <span class="nb">cd</span> liblcfg/code <span class="o">||</span> <span class="nb">exit</span> 1 autoreconf -vi ./configure --prefix<span class="o">=</span>/opt/dionaea make install <span class="nb">cd</span> .. <span class="nb">cd</span> .. <span class="c1">#libemu (all)</span> git clone git://git.carnivore.it/libemu.git libemu <span class="nb">cd</span> libemu <span class="o">||</span> <span class="nb">exit</span> 1 autoreconf -vi ./configure --prefix<span class="o">=</span>/opt/dionaea make install <span class="nb">cd</span> .. <span class="c1">#libnl (linux &amp;&amp; optional)</span> git clone git://github.com/tgraf/libnl.git <span class="nb">cd</span> libnl <span class="o">||</span> <span class="nb">exit</span> 1 autoreconf -vi <span class="nb">export</span> <span class="nv">LDFLAGS</span><span class="o">=</span>-Wl,-rpath,/opt/dionaea/lib ./configure --prefix<span class="o">=</span>/opt/dionaea make make install <span class="nb">cd</span> .. <span class="c1">#libev (all)</span> wget http://dist.schmorp.de/libev/libev-4.11.tar.gz tar xfz libev-4.11.tar.gz <span class="nb">cd</span> libev-4.11 <span class="o">||</span> <span class="nb">exit</span> 1 ./configure --prefix<span class="o">=</span>/opt/dionaea make install <span class="nb">cd</span> .. <span class="c1">#Python3</span> wget http://www.python.org/ftp/python/3.2.3/Python-3.2.3.tgz tar xfz Python-3.2.3.tgz <span class="nb">cd</span> Python-3.2.3/ <span class="o">||</span> <span class="nb">exit</span> 1 ./configure --enable-shared --prefix<span class="o">=</span>/opt/dionaea --with-computed-gotos <span class="se">\</span> --enable-ipv6 <span class="nv">LDFLAGS</span><span class="o">=</span><span class="s2">&quot;-Wl,-rpath=/opt/dionaea/lib/ -L/usr/lib/x86_64-linux-gnu/&quot;</span> make make install <span class="nb">cd</span> .. <span class="c1">#Cython (all)</span> <span class="c1">#We have to use cython &gt;= 0.15 as previous releases do not support Python3.2 __hash__&#39;s Py_Hash_type for x86.</span> wget http://cython.org/release/Cython-0.16.tar.gz tar xfz Cython-0.16.tar.gz <span class="nb">cd</span> Cython-0.16 <span class="o">||</span> <span class="nb">exit</span> 1 /opt/dionaea/bin/python3 setup.py install <span class="nb">cd</span> .. <span class="c1">#udns (!ubuntu)</span> <span class="c1">#udns does not use autotools to build.</span> wget http://www.corpit.ru/mjt/udns/old/udns_0.0.9.tar.gz tar xfz udns_0.0.9.tar.gz <span class="nb">cd</span> udns-0.0.9/ <span class="o">||</span> <span class="nb">exit</span> 1 ./configure make shared <span class="c1">#There is no make install, so we copy the header to our include directory.</span> cp udns.h /opt/dionaea/include/ <span class="c1">#and the lib to our library directory.</span> cp *.so* /opt/dionaea/lib/ <span class="nb">cd</span> /opt/dionaea/lib ln -s libudns.so.0 libudns.so <span class="nb">cd</span> - <span class="nb">cd</span> .. <span class="c1">#libpcap (most)</span> wget http://www.tcpdump.org/release/libpcap-1.1.1.tar.gz tar xfz libpcap-1.1.1.tar.gz <span class="nb">cd</span> libpcap-1.1.1 <span class="o">||</span> <span class="nb">exit</span> 1 ./configure --prefix<span class="o">=</span>/opt/dionaea make make install <span class="nb">cd</span> .. <span class="c1"># FINALLY!!!!</span> git clone git://git.carnivore.it/dionaea.git dionaea <span class="nb">cd</span> dionaea <span class="o">||</span> <span class="nb">exit</span> 1 autoreconf -vi ./configure --with-lcfg-include<span class="o">=</span>/opt/dionaea/include/ <span class="se">\</span> --with-lcfg-lib<span class="o">=</span>/opt/dionaea/lib/ <span class="se">\</span> --with-python<span class="o">=</span>/opt/dionaea/bin/python3.2 <span class="se">\</span> --with-cython-dir<span class="o">=</span>/opt/dionaea/bin <span class="se">\</span> --with-udns-include<span class="o">=</span>/opt/dionaea/include/ <span class="se">\</span> --with-udns-lib<span class="o">=</span>/opt/dionaea/lib/ <span class="se">\</span> --with-emu-include<span class="o">=</span>/opt/dionaea/include/ <span class="se">\</span> --with-emu-lib<span class="o">=</span>/opt/dionaea/lib/ <span class="se">\</span> --with-gc-include<span class="o">=</span>/usr/include/gc <span class="se">\</span> --with-ev-include<span class="o">=</span>/opt/dionaea/include <span class="se">\</span> --with-ev-lib<span class="o">=</span>/opt/dionaea/lib <span class="se">\</span> --with-nl-include<span class="o">=</span>/opt/dionaea/include <span class="se">\</span> --with-nl-lib<span class="o">=</span>/opt/dionaea/lib/ <span class="se">\</span> --with-curl-config<span class="o">=</span>/usr/bin/ <span class="se">\</span> --with-pcap-include<span class="o">=</span>/opt/dionaea/include <span class="se">\</span> --with-pcap-lib<span class="o">=</span>/opt/dionaea/lib/ make make install <span class="c1">#Fix some permissions</span> chown -R nobody:nogroup /opt/dionaea/var/dionaea <span class="nb">exit</span> 0 </pre></div> <p>WHEW! That's a big one huh? That took me several hours to suss out so I figured it's best shared! I also wrote an update script for the system and all the git based packages, which MOST were.</p> <div class="highlight"><pre><span></span><span class="ch">#!/bin/bash</span> aptitude update aptitude -y safe-upgrade <span class="c1"># liblcfg (all)</span> <span class="nb">cd</span> liblcfg <span class="o">||</span> <span class="nb">exit</span> 1 git clean git pull <span class="nb">cd</span> code autoreconf -vi ./configure --prefix<span class="o">=</span>/opt/dionaea make install <span class="nb">cd</span> .. <span class="nb">cd</span> .. <span class="c1">#libemu (all)</span> <span class="nb">cd</span> libemu <span class="o">||</span> <span class="nb">exit</span> 1 git clean git pull autoreconf -vi ./configure --prefix<span class="o">=</span>/opt/dionaea make install <span class="nb">cd</span> .. <span class="c1">#libnl (linux &amp;&amp; optional)</span> <span class="nb">cd</span> libnl <span class="o">||</span> <span class="nb">exit</span> 1 git clean git pull autoreconf -vi <span class="nb">export</span> <span class="nv">LDFLAGS</span><span class="o">=</span>-Wl,-rpath,/opt/dionaea/lib ./configure --prefix<span class="o">=</span>/opt/dionaea make make install <span class="nb">cd</span> .. <span class="c1"># FINALLY!!!!</span> <span class="nb">cd</span> dionaea <span class="o">||</span> <span class="nb">exit</span> 1 git clean git pull autoreconf -vi ./configure --with-lcfg-include<span class="o">=</span>/opt/dionaea/include/ <span class="se">\</span> --with-lcfg-lib<span class="o">=</span>/opt/dionaea/lib/ <span class="se">\</span> --with-python<span class="o">=</span>/opt/dionaea/bin/python3.2 <span class="se">\</span> --with-cython-dir<span class="o">=</span>/opt/dionaea/bin <span class="se">\</span> --with-udns-include<span class="o">=</span>/opt/dionaea/include/ <span class="se">\</span> --with-udns-lib<span class="o">=</span>/opt/dionaea/lib/ <span class="se">\</span> --with-emu-include<span class="o">=</span>/opt/dionaea/include/ <span class="se">\</span> --with-emu-lib<span class="o">=</span>/opt/dionaea/lib/ <span class="se">\</span> --with-gc-include<span class="o">=</span>/usr/include/gc <span class="se">\</span> --with-ev-include<span class="o">=</span>/opt/dionaea/include <span class="se">\</span> --with-ev-lib<span class="o">=</span>/opt/dionaea/lib <span class="se">\</span> --with-nl-include<span class="o">=</span>/opt/dionaea/include <span class="se">\</span> --with-nl-lib<span class="o">=</span>/opt/dionaea/lib/ <span class="se">\</span> --with-curl-config<span class="o">=</span>/usr/bin/ <span class="se">\</span> --with-pcap-include<span class="o">=</span>/opt/dionaea/include <span class="se">\</span> --with-pcap-lib<span class="o">=</span>/opt/dionaea/lib/ make make install <span class="c1">#Fix some permissions</span> chown -R nobody:nogroup /opt/dionaea/var/dionaea <span class="nb">exit</span> 0 </pre></div> <p>If you are following along at home I really recommend you put both of those scripts into their own <code>dio-build</code> directory since they make a mess of any directory you run them in and you want to keep all the installers about.</p> <p>All you have to do after that is start it all up</p> <div class="highlight"><pre><span></span> sudo p0f -i any -u root -Q /tmp/p0f.sock -q -l -d -o /dev/null -c 1024 &amp;&amp; sudo chown nobody /tmp/p0f.sock sudo /opt/dionaea/bin/dionaea -u nobody -g nogroup -p /opt/dionaea/var/dionaea.pid -D </pre></div> <p>If it doesn't self destruct then you are up and going. If course I recommend you set this up with something like runit but this will get your honeypot working.</p> <h2>Where the cool automation comes in</h2> <p>dionaea doesn't seem to have the cool IRC features of other honeypots but it still has web submissions. In fact it's designed to submit to several standard honeypots. I'm greedy so I deleted all of those and put in my Mac OS X server as one. For a quick and dirty python receiving server check through <a href="http://www.malwarecookbook.com/">MNIN Security | Malware Analyst's Cookbook</a> or buy the book.</p> <p>Having these md5 named malware files on my OS X server means… what? They get backed up? Whoopty dooo! I guess that means I have easier access to them but so what. Lets make my system do all the pre work for me!</p> <p>Using the power of the almighty <a href="http://www.noodlesoft.com/hazel.php">Noodlesoft Hazel</a>, <a href="http://mxcl.github.com/homebrew/">Homebrew</a>, and a few python packages the system watches the incoming binary directory for new files and then goes to work<sup id="fnref:WHERE"><a class="footnote-ref" href="#fn:WHERE" rel="footnote">1</a></sup>. It runs a series of scans on the files and chimes my phone with the summary on my new gift from the internet!</p> <p><img alt="iPhone Screenshot" src="/static/images/malware/iPhone.png" /></p> <p>Sweet huh? The first time I was sitting around and my phone chimed, delivering info on a fresh piece of malware, I did a dance.</p> <p>Logging into the box and running a single check against the name nets me a larger summary;</p> <div class="highlight"><pre><span></span>➜ malware ./pescanner.py binaries/12fb7332920a7797c2d02df29b57c640 ################################################################################ Record 0 ################################################################################ Meta-data ================================================================================ File: binaries/12fb7332920a7797c2d02df29b57c640 Size: 57344 bytes Type: PE32 executable (GUI) Intel 80386, for MS Windows MD5: 12fb7332920a7797c2d02df29b57c640 SHA1: 47707d46e3324be11cde22cdfe2be7d17193a5a2 ssdeep: Date: 0x4AD5C802 [Wed Oct 14 12:45:54 2009 UTC] EP: 0x40369e .text 0/4 CRC: Claimed: 0x0, Actual: 0x151d9 [SUSPICIOUS] Signature scans ================================================================================ Clamav: binaries/12fb7332920a7797c2d02df29b57c640: Trojan.Spy-78857 FOUND Resource entries ================================================================================ Name RVA Size Lang Sublang Type -------------------------------------------------------------------------------- RT_RCDATA 0xa0a0 0x4621 LANG_KOREAN SUBLANG_KOREAN data RT_RCDATA 0xe6c8 0x400 LANG_KOREAN SUBLANG_KOREAN PE32 executable (GUI) Intel 80386, for MS Windows, Petite compressed Suspicious IAT alerts ================================================================================ CreateProcessA StartServiceA CreateServiceA Sections ================================================================================ Name VirtAddr VirtSize RawSize Entropy -------------------------------------------------------------------------------- .text 0x1000 0x5196 0x6000 5.959918 .rdata 0x7000 0xc76 0x1000 4.498997 .data 0x8000 0x1cdc 0x1000 3.521438 .rsrc 0xa000 0x4ac8 0x5000 7.283870 [SUSPICIOUS] </pre></div> <p>The next piece of this will involve setting up parallels on the Mac Mini server and getting remote malware deployment and testing going. dionaea also records tcp streams so that it can capture shell codes, something I also want to start indexing and stealing up.</p> <div class="footnote"> <hr /> <ol> <li id="fn:WHERE"> <p>Where is this awesome collaboration of scripts you ask? Well I'm not giving up all the goods yet, especially since it's incomplete. Eventually I will probably post the whole deal. However most everything I set up is in Chapter 3 of the book I have been talking about the whole time. If you are <em>super</em> curious or want your own bunnypot <strong>now</strong> I can be bribed with beer and liquor like most hackers.&#160;<a class="footnote-backref" href="#fnref:WHERE" rev="footnote" title="Jump back to footnote 1 in the text">&#8617;</a></p> </li> </ol> </div>D.O.S.Sat, 04 Aug 2012 15:20:00 -0700tag:bunnyman.info,2012-08-04:posts/2012/Aug/04/bunnypot/More Pelican, or how I learned to stop worrying and start developing with others.http://bunnyman.info/posts/2012/Jul/17/pre-pelican-3/<p>Pelican 3.0 is almost out the door now. It's been great working on a "real" project with other developers for what is, in retrospect, the first time ever.</p> <p>Some programmers I know would rather fork a project and trudge off into the snow with the code base, then fork off their own leg and write their way back before working on someone else's code; I think at some point I caught that same fever from someone close to me. I think the phrase tossed around was; "The only thing that is worse than someone else's code is working with someone else's code." The crazy part is, after actually working with other people on a project I wish I had done it earlier.</p> <p>After fitting in to someone else's product and pitching my ideas and work into it instead of trying to run in it I almost don't want to go back. Not everything I've suggested flew, some things were downright rejected and other things had to be rethought to fit it all... but it was a great experience to have a driven goal and to contribute to it. Luckily the Pelican team is also small, awesome, and very supportive so I've found it downright pleasant to work with them... I realize that not every team is as friendly and constructive as the Pelican project has been but the concept of check and balances and the feedback alone is invaluable.</p> <p>Yes, there is a part of me that wants to be the solo super programmer hacker that gets an idea and sits down to write the next program that becomes the next golden standard but we can't all be Linus and honestly, who wants to maintain that project into the ground? I'm not an amazing programmer, maybe someday I will be after lots of training. My programs work but without constant learning and challenges they aren't going to be written well.</p> <p>While cleaning out little bugs and documenting things over several times may not be everyone's best use of time; I feel getting used to have to test everything, double think my commits, write tests for everything is important. Normally I can be a little lazy with my commit, get it in and test it after that... but I can't just do that with a bigger project. On a personal project you can quickly develop and learn bad habits. Working with a team forces good habits, or at least as good habits as the team itself.</p> <p>For big professional life time programmers I am probably preaching to the choir. Term development, code review, and focused controlled projects with deadlines are vital to putting out great projects. For all those that have been playing the part of the antisocial developer, like I was, I really recommend finding a smaller project that you can help grow, getting in on the channel, and getting your team coding on... you will be shocked how great it can be to work on a project together once ego gets set aside.</p> <hr /> <p>The project has sidetracked several other of my side projects, but in one of the best ways possible considering the amount of joy and constructive knowledge and experience I think I am getting from it. I still plan on learning more languages, namely lisp… but right now I am juggling working on this project and studying reversing, one of my biggest interests for the future.</p> <p>As a whole sidetrack to this whole post, I think that infosec is where I am going to steer my career and reversing and malware is my current big "interest". Even if I can't grok it enough to become a professional malware analyzer or software analyzer, learning some of the lowest levels of computing and programming will help me understand all the other facets of security and infrastructure that much better. Not that infrastructure management isn't a great career, but I don't feel it's really focusing me where I want to be long term. I have days where I really regret stepping up from Sr. Systems Admin.</p>D.O.S.Tue, 17 Jul 2012 14:19:00 -0700tag:bunnyman.info,2012-07-17:posts/2012/Jul/17/pre-pelican-3/PelicanNow with less dynamicshttp://bunnyman.info/posts/2012/Jul/06/pelican-changeover/<p>I've been stalling a lot on writing this post. I guess I wanted everything to be perfect by the time I actually wrote about it however my willpower to finish these test cases is weak.</p> <p>The site has now changed, yet again. I decided not to wait 5 years between refreshes this time.</p> <p>The biggest change people should notice is at first glance you shouldn't notice change. When you click around it should be easy to realize that the site isn't WordPress based anymore though. I've switched over to <a href="http://pelican.notmyidea.org/en/2.8/index.html">Pelican</a>. The project still feels very young and small, but it's done in python and the developers are very active and open to submissions so I jumped in.</p> <p>It's took some wiggling around to get into it, and lots of bashing on my old chunk theme to get it to look perfect in Pelican but in the end I really like the fact I did a lot of back end work to the system. I submitted my theme to the official <a href="https://github.com/ametaireau/pelican-themes">Theme's repo</a> and am currently working on adding in several features of my own to the project... and by several I mean I have a to-do list longer than most any of my own software by far.</p>D.O.S.Fri, 06 Jul 2012 19:04:00 -0700tag:bunnyman.info,2012-07-06:posts/2012/Jul/06/pelican-changeover/PelicanA little thank you goes a long wayhttp://bunnyman.info/posts/2012/Jun/27/giving-thanks/<p>Things like this happen sometimes</p> <div class="highlight"><pre><span></span>[4:27 PM] &lt;SnowLprd&gt; tBunnyMan: Nice work on #389. I can see how that will come in handy. :^) [4:27 PM] &lt;tBunnyMan&gt; Thanks! [4:28 PM] &lt;tBunnyMan&gt; I really just wanted a 404 and 50x error that matched my theme... but making it more extensible helps everyone [4:28 PM] &lt;tBunnyMan&gt; I just need to finish this test case for it when work stops being annoying [4:29 PM] &lt;SnowLprd&gt; Nice of you to generalize it for everyone, despite only needing it yourself for 404/50x errors. [4:29 PM] &lt;SnowLprd&gt; And the test will also be most welcome! \o/ [4:32 PM] &lt;tBunnyMan&gt; Pelican is fairly awesome IMO, I hope I can help tweak it into epic levels. [4:34 PM] &lt;SnowLprd&gt; With contributions like yours, those levels will be here in short order. :D [4:34 PM] &lt;tBunnyMan&gt; haha. I&#39;m not that good ;p Thanks for the kind words [4:35 PM] &lt;tBunnyMan&gt; Catch you around. It&#39;s time to travel [4:35 PM] &lt;SnowLprd&gt; Every little bit counts! [4:35 PM] &lt;SnowLprd&gt; Sounds good. Cheers! [4:36 PM] &lt;tBunnyMan&gt; It does. It&#39;s why I love contributing little things to big projects. </pre></div> <p>All I really was trying to do is add a very quick and simple feature I needed. This was the response I got for it! The thing is, you would be shocked how infrequently I see something like this... It's this type of additude and behavior amongst developers that makes people WANT to work with eachother and help really grow a product. </p> <p>I just wanted to post a little good will and show that some people rule. Expecially SnowLprd, kylef, bbinet, and doubly so alexis!</p>D.O.S.Wed, 27 Jun 2012 17:37:00 -0700tag:bunnyman.info,2012-06-27:posts/2012/Jun/27/giving-thanks/pelicanSmall Updatehttp://bunnyman.info/posts/2012/Jun/19/small-update/<p>I haven’t posted in a while because I am working on redoing this site. Once I am done with the backend I will start updating regularly.</p>D.O.S.Tue, 19 Jun 2012 00:00:00 -0700tag:bunnyman.info,2012-06-19:posts/2012/Jun/19/small-update/My Contribution to Calibrehttp://bunnyman.info/posts/2012/Apr/30/my-contribution-to-calibre/<h2>Backstory</h2> <p>When I bought my <a href="http://www.barnesandnoble.com/p/nook-simple-touch-barnes-noble/1102344735">NOOK Simple Touch™</a> in January of this year I rediscovered <a href="http://calibre-ebook.com/">calibre E-book management</a>. While software always felt clunky in Mac OS X you could never deny it's power and sheer amazing once you got past the UI.</p> <p>Being a big fan of ReadItLater I immediately tried to have the program pump my massive reading list into my Nook. To my dismay I discovered that the plugin was hardly complete. It piped my entire ~500 article<sup id="fnref:size"><a class="footnote-ref" href="#fn:size" rel="footnote">1</a></sup> reading list into a several megabytes large ebook and ordered articles from newest to oldest. Running the plugin a second time… produced the same results. It hadn't even the courtesy to mark articles as read.</p> <p>After digging about I found a few "close enough but incomplete" and outdated solutions along side plenty of complaints. You can't blame Calibre, the massive project's maintainers likely don't use the service like I do of at all.</p> <h2>Solution</h2> <p>A python based open source project with something that I want improved? A bunny like me only can do one thing in a situation like this; reach back to grab one of my many 'cans', learn the <a href="http://manual.calibre-ebook.com/news_recipe.html">API Documentation for recipes</a>, and get my money out of PyCharm.</p> <p>After a few days and learning more than just Calibre api<sup id="fnref:browser"><a class="footnote-ref" href="#fn:browser" rel="footnote">2</a></sup>, I put out what I called ReadItLater V3 on to <a href="https://github.com/onlyhavecans/ReadItLater-Calibre-Plugin">my github</a> and reposted it to <a href="http://www.mobileread.com/forums/forumdisplay.php?f=228">Calibre Recipes MobileRead Forums</a>. Other people picked it up and I ended up adding a few extra features per requests</p> <p>All was good with the world.</p> <h2>Reward</h2> <p>A few weeks ago Read It Later officially rebranded to <a href="http://getpocket.com">Pocket</a>. This prompted me to pull up Calibre and check my plugin was working… all clear. Then, since I like to cover my bases, I pulled up Mobile Reads and dug around… and that's when I found it.</p> <p><a href="http://bazaar.launchpad.net/~kovid/calibre/trunk/revision/11867.1.2"><strong>Calibre merged my version into the official trunk</strong></a><sup id="fnref:linkchoice"><a class="footnote-ref" href="#fn:linkchoice" rel="footnote">3</a></sup>.</p> <p>This invigorated me to put my all into the project. However, all I really managed was the branding, some code cleanup, and docs. Pocket wasn't ready to give out their new API to small beans like me. At one point during this Calibre devs merged in someone else's but quickly pushed my <a href="http://bazaar.launchpad.net/~kovid/calibre/trunk/revision/11935">latest version</a> once I completed it.</p> <p>I find myself flattered to have my code and name, even my pseudonym, in such a prestigious python project. Some of my friends felt my accomplishment was mediocre at best but I reject the haters. I've actively contributed to widely used open source. I don't get a ton of warm fuzzies from my wins but this was one of those times. I'm still stoked as hell and hope that I can do it again.</p> <div class="footnote"> <hr /> <ol> <li id="fn:size"> <p>I should get my reading list under control. My situation with real books looks exactly the same way, stacks and stacks of the latest up read interests. I read plenty but the information overload fills the world; the challenge of sorting fluff from gold increases daily.&#160;<a class="footnote-backref" href="#fnref:size" rev="footnote" title="Jump back to footnote 1 in the text">&#8617;</a></p> </li> <li id="fn:browser"> <p><a href="http://wwwsearch.sourceforge.net/mechanize/">mechanize Browser</a> and <a href="http://www.crummy.com/software/BeautifulSoup/bs3/documentation.html">Beautiful Soup</a> are now favorites in my toolbox of handling and scraping web content, something I do more than any bunny should.&#160;<a class="footnote-backref" href="#fnref:browser" rev="footnote" title="Jump back to footnote 2 in the text">&#8617;</a></p> </li> <li id="fn:linkchoice"> <p>While this link only shows one part of the merge I chose it because it showed when they merged in my name to the top. Eventually they replaced the whole thing with my version.&#160;<a class="footnote-backref" href="#fnref:linkchoice" rev="footnote" title="Jump back to footnote 3 in the text">&#8617;</a></p> </li> </ol> </div>D.O.S.Mon, 30 Apr 2012 00:00:00 -0700tag:bunnyman.info,2012-04-30:posts/2012/Apr/30/my-contribution-to-calibre/The search for the perfect wallethttp://bunnyman.info/posts/2012/Mar/21/the-search-for-the-perfect-wallet/<p>Through my whole life I have always struggled to find the perfect tool for the job. No matter what I am doing I from the big to the little I question methods and tools I am using. Sometimes I find it, sometimes I struggle on and on. This is a story about how I think I found perfection.</p> <p>I have always had a fascination with wallets. They are where we keep the summary of our life and our valuables. Your wallet is like a woman's purse, the thing that curious people want to pick through to find out more about you and the thing more introspective people think about how it reflects on them. Any time you pay for something the seller glances down and takes a quick look not just at your payment but at what it is coming out of. Your wallet is a statement of you in one of those subtle ways.</p> <p>In my search I have gone through piles of wallets. I still have a small box in my closet that I have been loathe to throw away with then. I have gone from sleek leather, to big woven bulletproof nylon with lots of features, to slim money clips with stamped leather card slots, to the famous minimal <a href="http://www.koyono.com/Slimmy-Slim-Wallet-Alternative-p/m17546.htm">Slimmy</a>. Even with the Slimmy I went through two separate versions, one with window and one without.</p> <p><img src="/static/images/wallet/Wallet-Comparison.jpg" alt="Slimmy Vs Band" title="Wallet-Comparison.jpg" border="0" width="224" height="300" style="float:right;" /></p> <p>My goal was to find a wallet that held everything I need to carry with me while still being small and slim. I have been on the largest minimal kick so the Slimmy and money clips were used for the last three years but they were too minimal for my needs. In the end the fact remains that any wallet I found that is small enough to make me happy didn't hold enough and any wallet with enough space for everything was just too damn big.</p> <p>The answer to my problem came to me several weeks ago while I was hanging out at a bar with my younger brother. We were about to tip up and I heard a familiar sound, the sound of rubber against the hard plastic of a credit card before snapping into place.</p> <p>As a child my father never carried a wallet. He always just took his little pocket address book, pressed all of his cards up against it, folded up some money, and then wrapped it up in a pair of rubber bands. I asked him several times about why he never carried a wallet like everyone else and he told me it was because he never found a wallet he liked. Also, since he received the newspaper which is wrapped in a rubber band, it was free and replaceable weekly.</p> <p>Like father like son I guess. When I asked my brother about it he said he "got it from dad" and "It was inevitable, you will succumb to it too." It was and I did.</p> <p><img src="/static/images/wallet/Wallet-w-battery.jpg" alt="Wallet w/ battery" title="Wallet-w-battery.jpg" border="0" width="224" height="300" style="float:left;" /></p> <p>In the top most picture I didn't use a normal rubber band but I quickly found that any fancy band I used was too much. Through a few months of testing I found that a traditional rubber band was just enough. In the picture you can easily see that I took the contents of the Slimmy, added my notebook and with the band it is still thinner than the EMPTY Slimmy. Even if I were to add more cards, which I have done, the wallet still manages to be no bigger than the standard four cards and a small amount of cash in a Slimmy that they recommend.<sup id="fnref:SLIMMY"><a class="footnote-ref" href="#fn:SLIMMY" rel="footnote">1</a></sup></p> <p>My rubber band wallet currently contains a <a href="http://www.moleskine.com/catalogue/classic/cahier/set_of_2_volant_notebooks_ruled__pink__extra_small.php">Moleskine extra small notebook</a><sup id="fnref:PINK"><a class="footnote-ref" href="#fn:PINK" rel="footnote">2</a></sup>, A <a href="http://www.zebrapen.com/products/pen/telescopic-brights?c=29">collapsable pen</a> to write with, a small set of cash, and every card and ID I could need on a day. Somehow it is still smaller and more useful than every wallet I have owned before!</p> <p>As you can see with the pictures just above the new wallet is just a hair thicker than a AA battery and holds a mass of cards. In fact it actually contains more cards than I actually need. I found if there was too few cards the pen will roll over the cards and wiggle about. I now keep every gift card I have, my Fresh &amp; Easy card, and a random hotel keycard from FurtherConfusion with art on it. Minimalism is amazing but the fact that I never have to go "Oh crap, I forgot card X" is nice.</p> <p>As for looks? What does this say about me? While as a kid I thought it tacky to have a rubber band for a wallet most people tend to comment on how utilitarian and useful that is. How it holds a notebook and pen in the same space as their own bloated wallets.</p> <p>No matter how many times I think about the process I think I found the perfect one for the job.</p> <div class="footnote"> <hr /> <ol> <li id="fn:SLIMMY"> <p>My problem with the slimy is its design. It is only meant to hold about four cards and a small amount of cash. On any day I need to carry my ID, Work ID, Debit Card, PCard. This means ALL extra credit cards, Costco memberships, health cards, gift cards, and even business cards are out. Yes I can live without them but having to drive home and grab my Costco card or applicable gift card every time I want to grab some shopping on the way home is ANNOYING.&#160;<a class="footnote-backref" href="#fnref:SLIMMY" rev="footnote" title="Jump back to footnote 1 in the text">&#8617;</a></p> </li> <li id="fn:PINK"> <p>I use a BRIGHT PINK notebook too. It gets comments a lot, sometimes snide, sometimes funny… but the fact of the matter is when my "wallet" is on the table it's hard to miss and that in the end is the point; High visibility.&#160;<a class="footnote-backref" href="#fnref:PINK" rev="footnote" title="Jump back to footnote 2 in the text">&#8617;</a></p> </li> </ol> </div>D.O.S.Wed, 21 Mar 2012 00:00:00 -0700tag:bunnyman.info,2012-03-21:posts/2012/Mar/21/the-search-for-the-perfect-wallet/Nothing happens for a reasonhttp://bunnyman.info/posts/2012/Mar/14/nothing-happens-for-a-reason/<p><strong>"Everything happens for a reason."</strong> I read this normally innocuous phrase on a friend's blog recently and wanted to toss my coffee mug. The notion of the phrase makes me want to jump out of my chair and flip my keyboard. I'm not going to rag on them for saying or even feeling it, it's simply not my place to tell people how to live their lives, however it bothers me that people who I care about in the world think like that.</p> <p>I think the mentality of saying not only goes against my beliefs but undermines people's ability to excel. The phrase is a sheep-like mindset that tells us to embrace our losses instead of trying to overcome them. The nature<sup id="fnref:NATURE"><a class="footnote-ref" href="#fn:NATURE" rel="footnote">1</a></sup> of the phrase is predestination, which inherently is talking about divinity, though most often when I see people use it the meaning is less of a religious mentality<sup id="fnref:GOD"><a class="footnote-ref" href="#fn:GOD" rel="footnote">2</a></sup> and more an extension of <a href="http://en.wikipedia.org/wiki/Sour_grapes">sour grapes</a>. When we over-rationalize our painful decisions or situations we become placated or fight the reoccurrence of the opportunity because <em>it wasn't meant to be</em>. We need some level of coping when we have perceived large losses but too much drags us down.</p> <p>I quickly jumped up on the train of thought that this year's Burning Man was going to be a bomb when I was denied access to STEP<sup id="fnref:STEP"><a class="footnote-ref" href="#fn:STEP" rel="footnote">3</a></sup>. However I never rationalized my loss to some point of divinity or told myself that there might be something better I need to make. There is no <em>meant to be</em> in my eyes; only what is and what is not. To this end I penciled in three furry conventions to fill my summer and replace the burn. Just a few days ago some things fell in to place and now I have access to tickets. Had I chose the <em>meant to be</em> mentality would I still want these tickets? Was there a reason for me to go through the extra month and a half of mental strife? No. It happened because mistakes were made. I received an opportunity to get tickets this month because of the people I choose to associate with and the impression I put on them. There was no luck in the preceding.</p> <p>I am unwilling to ague the validity of anyone's religious or spiritual beliefs but I believe that the moment you take the mentality that anything but you controls and shapes your life you give up the ability to reach your full potential. Removing the accountability for your problems not only dulls the pain of the problems but also the need to own and fix the them.</p> <div class="footnote"> <hr /> <ol> <li id="fn:NATURE"> <p>I'm not going to get into the literal meaning of the phrase, because technically everything <em>does</em> happen for a reason. Laws of nature, inertia, influence, chemical reactions, etc. I am taking about what people mean when they say <em>everything happens for a reason</em>. I was unable to find the etymology in searches but according to my results it seems that the phrase most likely stems from religion.&#160;<a class="footnote-backref" href="#fnref:NATURE" rev="footnote" title="Jump back to footnote 1 in the text">&#8617;</a></p> </li> <li id="fn:GOD"> <p>Though my mother often uses the phrase followed with <em>"God has a plan"</em>, most of my friends don't seem to subscribe to the hyper religious mentality.&#160;<a class="footnote-backref" href="#fnref:GOD" rev="footnote" title="Jump back to footnote 2 in the text">&#8617;</a></p> </li> <li id="fn:STEP"> <p>I didn't enter the initial lotto, instead choosing to hold out for the full price second sales. Only people who entered the lotto for cheaper tickets where given access to STEP, the second chance ticket (re)sale system.&#160;<a class="footnote-backref" href="#fnref:STEP" rev="footnote" title="Jump back to footnote 3 in the text">&#8617;</a></p> </li> </ol> </div>D.O.S.Wed, 14 Mar 2012 00:00:00 -0700tag:bunnyman.info,2012-03-14:posts/2012/Mar/14/nothing-happens-for-a-reason/Things that are not happening for 100, Alexhttp://bunnyman.info/posts/2012/Mar/08/things-that-are-not-happening-for-100-alex/<blockquote> <p>A: Importing this content into the new site was attempted only for a few moments before a review of it's nature and amount had it canceled.</p> <p>Q: What is, BunnyMan's old LJ?</p> </blockquote> <p>Correct!</p> <p>Wow. No, not happening. I still have it all backed up but I think all that old content will stay back there. I am currently trying to set this up so I can post my mostly private journal here as well as posting public news and information. LJ will not be getting 100% of the content I post, but it still will get some updates. The dawn of handpicked RSS content and feeds has consumed community and "friend based" feeds and for the most part I think we are better for it. I'm getting on the ship.</p>D.O.S.Thu, 08 Mar 2012 00:00:00 -0800tag:bunnyman.info,2012-03-08:posts/2012/Mar/08/things-that-are-not-happening-for-100-alex/Wow!http://bunnyman.info/posts/2012/Mar/08/wow/<p>Another new site, another clean slate ready to be filled with so much information!</p> <p>I will try to make this site as little about the drivel, porn, rage, and trolls that the rest of the internet seems to amuse itself about. This site is going to be all about the things that really interest me. Currently those things are Fiction, Writing, Technology, writing fiction, and Productivity… There also may be stuff about glitchy painful music and podcasts.</p> <p>My old site is archived safe and while most of the old links may be gone feel free to check it out. It highlights one of the busiest and most externally exciting period of my life where photography and music production was every facet of my life. You can also feel free to ask questions if you really care. I don't expect this site to get too much traffic.</p>D.O.S.Thu, 08 Mar 2012 00:00:00 -0800tag:bunnyman.info,2012-03-08:posts/2012/Mar/08/wow/