<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>HackDevDotCom &#187; Roll your own:</title>
	<atom:link href="http://hackdev.com/category/roll-your-own/feed/" rel="self" type="application/rss+xml" />
	<link>http://hackdev.com</link>
	<description>Hacked Development</description>
	<lastBuildDate>Wed, 25 Jan 2012 23:58:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>A few changes&#8230;</title>
		<link>http://hackdev.com/2011/01/changes/</link>
		<comments>http://hackdev.com/2011/01/changes/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 18:44:46 +0000</pubDate>
		<dc:creator>Gues7</dc:creator>
				<category><![CDATA[Fixes / Patches]]></category>
		<category><![CDATA[Game Server]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Roll your own:]]></category>

		<guid isPermaLink="false">http://hackdev.com/?p=269</guid>
		<description><![CDATA[Howdy folks, firstly, there has been a lot of 3rd party development going on in relation to the black ops RCON tool, but none of it was by me. In fact, I found the game so infuriatingly laggy that I &#8230; <a href="http://hackdev.com/2011/01/changes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Howdy folks, firstly, there has been a lot of 3rd party development going on in relation to the black ops RCON tool, but none of it was by me. In fact, I found the game so infuriatingly laggy that I canceled my server so I no longer have anything to test on, as a result I have lost interest in the project and have closed the github repo; however, I will post the code here so anyone who wants it can take it and use it, do what ever you like with it under the MIT license.</p>
<p>RCON Source Code available <a title="http://hackdev.com/2011/01/changes/cod-bo_rcon/" href="http://hackdev.com/2011/01/changes/cod-bo_rcon/">here</a>.</p>
<p>I am also unemployed now <img src='http://hackdev.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  IMHO it was a great move, as it will allow me to have a break from doing anything really for the first time since I started school when I was 4 or 5&#8230; it has also given me the push I needed to go back to college and train myself up .</p>
<p>I have been working on a few projects now too with my increase in available time, however I&#8217;m not going to say much about them at the moment in case I don&#8217;t finish em.</p>
]]></content:encoded>
			<wfw:commentRss>http://hackdev.com/2011/01/changes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updated Black Ops RCON</title>
		<link>http://hackdev.com/2010/11/updated-black-ops-rcon/</link>
		<comments>http://hackdev.com/2010/11/updated-black-ops-rcon/#comments</comments>
		<pubDate>Sun, 14 Nov 2010 16:39:50 +0000</pubDate>
		<dc:creator>Gues7</dc:creator>
				<category><![CDATA[Fixes / Patches]]></category>
		<category><![CDATA[Game Server]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Roll your own:]]></category>

		<guid isPermaLink="false">http://hackdev.com/?p=233</guid>
		<description><![CDATA[Hey folks, this is just a quick update to let you know I have still been working on this&#8230; as it stands I have implemented two functions which work, and one which doesn&#8217;t. Slowly but surely I will be adding &#8230; <a href="http://hackdev.com/2010/11/updated-black-ops-rcon/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hey folks, this is just a quick update to let you know I have still been working on this&#8230; as it stands I have implemented two functions which work, and one which doesn&#8217;t. Slowly but surely I will be adding more and more functionality&#8230; unfortunately I don&#8217;t have RCON access to an unranked server at the moment, would anyone like to oblige me on that? <img src='http://hackdev.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I would also like to mention at this point, that I have not looked into causing errors on the RCON, ie invalid logins etc&#8230; so be warned, while most of this should work, I cannot and will not guarantee it. Also, it is written for Python 2.6, not 3.whatever&#8230; I will be getting a few more people on board to help with this soon and we will be cleaning it up, adding error handling etc&#8230;</p>
<p>Anyways, here is what you have all been waiting for&#8230;.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/python</span>
&nbsp;
<span style="color: #483d8b;">''</span><span style="color: #483d8b;">'
_______               ________      .___
<span style="color: #000099; font-weight: bold;">\ </span>  _  <span style="color: #000099; font-weight: bold;">\_</span>_  _  ______ <span style="color: #000099; font-weight: bold;">\_</span>____  <span style="color: #000099; font-weight: bold;">\ </span>  __| _/
/  /_<span style="color: #000099; font-weight: bold;">\ </span> <span style="color: #000099; font-weight: bold;">\ </span><span style="color: #000099; font-weight: bold;">\/</span> <span style="color: #000099; font-weight: bold;">\/</span> /    <span style="color: #000099; font-weight: bold;">\ </span> _(__  &amp;lt;  / __ |
<span style="color: #000099; font-weight: bold;">\ </span> <span style="color: #000099; font-weight: bold;">\_</span>/   <span style="color: #000099; font-weight: bold;">\ </span>    /   |  <span style="color: #000099; font-weight: bold;">\/</span>       <span style="color: #000099; font-weight: bold;">\/</span> /_/ |
 <span style="color: #000099; font-weight: bold;">\_</span>____  /<span style="color: #000099; font-weight: bold;">\/</span><span style="color: #000099; font-weight: bold;">\_</span>/|___|  /______  /<span style="color: #000099; font-weight: bold;">\_</span>___ |
       <span style="color: #000099; font-weight: bold;">\/</span>           <span style="color: #000099; font-weight: bold;">\/</span>       <span style="color: #000099; font-weight: bold;">\/</span>      <span style="color: #000099; font-weight: bold;">\/</span>
                    http://hackdev.com
&nbsp;
Author:
    Steven from hackdev.com
&nbsp;
File History:
    09/11/10:
        [+] Initial Inception. Proof of concept written entirely inline that
            allows for a single hard coded command to be sent to the server.
&nbsp;
    10/11/10:
        [+] Creation of functions to handle the sending and receiving of commands.
        [+] Added the ability for users to change passwords in the configuration
            section of the script.
        [+] Broke commands, preambles etc... into variables for easier use &amp;amp; modification.
        [+] Added comments, previous code did not contain comments. ** Important **
    14/11/10:
        [+] Added command boGetPlayerList
        [+] Added command boSayToServer
        [+] Added command boSayToPlayer
        [+] Figured out that not everything has to be done in <span style="color: #000099; font-weight: bold;">\x</span>68<span style="color: #000099; font-weight: bold;">\x</span>65<span style="color: #000099; font-weight: bold;">\x</span>78
&nbsp;
'</span><span style="color: #483d8b;">''</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">socket</span>       <span style="color: #808080; font-style: italic;">#Used for creating the UDP sockets</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#-----------------------------------------------------------------------------------</span>
<span style="color: #808080; font-style: italic;">#   User Configurable Options</span>
<span style="color: #808080; font-style: italic;">#-----------------------------------------------------------------------------------</span>
&nbsp;
boHost          = <span style="color: #483d8b;">&quot;&quot;</span>      <span style="color: #808080; font-style: italic;">#The server IP</span>
boPort          = <span style="color: #ff4500;">3074</span>                  <span style="color: #808080; font-style: italic;">#The server Port</span>
boPassword      = <span style="color: #483d8b;">&quot;&quot;</span>              <span style="color: #808080; font-style: italic;">#The RCON Password</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#-----------------------------------------------------------------------------------</span>
<span style="color: #808080; font-style: italic;">#   End User Configurable Options</span>
<span style="color: #808080; font-style: italic;">#-----------------------------------------------------------------------------------</span>
&nbsp;
svrAddress = <span style="color: black;">&#40;</span>boHost, boPort<span style="color: black;">&#41;</span>           <span style="color: #808080; font-style: italic;">#Used to create a tuple of host &amp;amp; port</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#-----------------------------------------------------------------------------------</span>
<span style="color: #808080; font-style: italic;">#   Command Definitions, sorry about the variables :(</span>
<span style="color: #808080; font-style: italic;">#-----------------------------------------------------------------------------------</span>
<span style="color: #ff7700;font-weight:bold;">global</span> cmdPreamble
cmdPreamble  = <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>ff<span style="color: #000099; font-weight: bold;">\x</span>ff<span style="color: #000099; font-weight: bold;">\x</span>ff<span style="color: #000099; font-weight: bold;">\x</span>ff<span style="color: #000099; font-weight: bold;">\x</span>00&quot;</span>                       <span style="color: #808080; font-style: italic;">#Preamble used to prefix the packet</span>
<span style="color: #ff7700;font-weight:bold;">global</span> cmdSeporator
cmdSeporator = <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>20&quot;</span>                                       <span style="color: #808080; font-style: italic;">#Seporator used between password &amp;amp; command</span>
<span style="color: #ff7700;font-weight:bold;">global</span> cmdPostamble
cmdPostamble = <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\0</span>0&quot;</span>                                        <span style="color: #808080; font-style: italic;">#Ending of the packet, end of command</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#-----------------------------------------------------------------------------------</span>
<span style="color: #808080; font-style: italic;">#   Socket Generation</span>
<span style="color: #808080; font-style: italic;">#-----------------------------------------------------------------------------------</span>
udpSock = <span style="color: #dc143c;">socket</span>.<span style="color: #dc143c;">socket</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">socket</span>.<span style="color: black;">AF_INET</span>, <span style="color: #dc143c;">socket</span>.<span style="color: black;">SOCK_DGRAM</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#-----------------------------------------------------------------------------------</span>
<span style="color: #808080; font-style: italic;">#   Function used to send commands to the server, function returns the</span>
<span style="color: #808080; font-style: italic;">#   data returned from the query, unformatted...</span>
<span style="color: #808080; font-style: italic;">#-----------------------------------------------------------------------------------</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> boSendCommand<span style="color: black;">&#40;</span>boCommand, boArgument=<span style="color: #ff4500;">0</span>, recvBufferSize=<span style="color: #ff4500;">4096</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff7700;font-weight:bold;">not</span> boArgument:
        commandBuffer = cmdPreamble + boPassword + cmdSeporator + boCommand + cmdPostamble
    <span style="color: #ff7700;font-weight:bold;">else</span>:
        commandBuffer = cmdPreamble + boPassword + cmdSeporator + boCommand + cmdSeporator + boArgument + cmdPostamble
    boSentBytes = udpSock.<span style="color: black;">sendto</span><span style="color: black;">&#40;</span>commandBuffer, svrAddress<span style="color: black;">&#41;</span>     <span style="color: #808080; font-style: italic;">#Send the data to the server</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: black;">&#40;</span>boSentBytes <span style="color: #66cc66;">&amp;</span>lt<span style="color: #66cc66;">;</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span>commandBuffer<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>:                      <span style="color: #808080; font-style: italic;">#Check the num of bytes sent</span>
        <span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;An error was encountered while sending the command %s&quot;</span>, boCommand<span style="color: black;">&#41;</span>
    boRecvBuffer = udpSock.<span style="color: black;">recv</span><span style="color: black;">&#40;</span>recvBufferSize<span style="color: black;">&#41;</span>                 <span style="color: #808080; font-style: italic;">#Receive the data returned</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span>boRecvBuffer<span style="color: black;">&#41;</span> <span style="color: #66cc66;">&amp;</span>gt<span style="color: #66cc66;">;</span> <span style="color: #ff4500;">0</span>:                                   <span style="color: #808080; font-style: italic;">#Check to ensure there is something</span>
        <span style="color: #ff7700;font-weight:bold;">return</span> boRecvBuffer                                     <span style="color: #808080; font-style: italic;">#Return the buffer</span>
    <span style="color: #ff7700;font-weight:bold;">else</span>:
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #ff4500;">0</span>                                                <span style="color: #808080; font-style: italic;">#If theres nothing, return 0</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> boGetPlayerList<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
    playerlist = boSendCommand<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;teamstatus&quot;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff7700;font-weight:bold;">not</span> playerlist:
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #ff4500;">0</span>
    <span style="color: #ff7700;font-weight:bold;">else</span>:
        <span style="color: #ff7700;font-weight:bold;">return</span> playerlist
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> boSayToServer<span style="color: black;">&#40;</span>message<span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff7700;font-weight:bold;">not</span> message:
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #ff4500;">0</span>
    <span style="color: #ff7700;font-weight:bold;">else</span>:
        servermessage = boSendCommand<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;say&quot;</span>, <span style="color: #483d8b;">'&quot;'</span> + message + <span style="color: #483d8b;">'&quot;'</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff7700;font-weight:bold;">not</span> servermessage:
            <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #ff4500;">0</span>
        <span style="color: #ff7700;font-weight:bold;">else</span>:
            <span style="color: #ff7700;font-weight:bold;">return</span> servermessage
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> boSayToPlayer<span style="color: black;">&#40;</span>message, playerID<span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff7700;font-weight:bold;">not</span> message <span style="color: #ff7700;font-weight:bold;">or</span> <span style="color: #ff7700;font-weight:bold;">not</span> playerID:
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #ff4500;">0</span>
    <span style="color: #ff7700;font-weight:bold;">else</span>:
        playermessage = boSendCommand<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;tell&quot;</span>, playerID + <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>20&quot;</span> + <span style="color: #483d8b;">'&quot;'</span> + message + <span style="color: #483d8b;">'&quot;'</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff7700;font-weight:bold;">not</span> playermessage:
            <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #ff4500;">0</span>
        <span style="color: #ff7700;font-weight:bold;">else</span>:
            <span style="color: #ff7700;font-weight:bold;">return</span> playermessage
&nbsp;
<span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Playerlist&quot;</span><span style="color: black;">&#41;</span>
myPlayerList = boGetPlayerList<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span>myPlayerList<span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Server Message&quot;</span><span style="color: black;">&#41;</span>
myServerMessage = boSayToServer<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Testing!&quot;</span><span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span>myServerMessage<span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Player Message&quot;</span><span style="color: black;">&#41;</span>
myPlayerMessage = boSayToPlayer<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Testing 123&quot;</span>, <span style="color: #483d8b;">&quot;1&quot;</span><span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span>myPlayerMessage<span style="color: black;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://hackdev.com/2010/11/updated-black-ops-rcon/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Call Of Duty : Black Ops RCON Hacked! Kinda&#8230;</title>
		<link>http://hackdev.com/2010/11/call-of-duty-black-ops-cracked/</link>
		<comments>http://hackdev.com/2010/11/call-of-duty-black-ops-cracked/#comments</comments>
		<pubDate>Tue, 09 Nov 2010 02:40:31 +0000</pubDate>
		<dc:creator>Gues7</dc:creator>
				<category><![CDATA[Fixes / Patches]]></category>
		<category><![CDATA[Game Server]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Roll your own:]]></category>

		<guid isPermaLink="false">http://hackdev.com/?p=221</guid>
		<description><![CDATA[Yes, thats right folks, following a bit of a hacking session with the CoD:BO RCON client and wireshark, I now have some Python code that is capable of logging into the RCON on a CoD:BO server! AFAIK, I am the &#8230; <a href="http://hackdev.com/2010/11/call-of-duty-black-ops-cracked/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Yes, thats right folks, following a bit of a hacking session with the CoD:BO RCON client and wireshark, I now have some Python code that is capable of logging into the RCON on a CoD:BO server!</p>
<p>AFAIK, I am the first person in the world outside of treyarch to have done this and I have elected to share this with all of you, it may not be clean, and it may not be fancy&#8230; but damn it it works! (Its late and I haven&#8217;t slept&#8230;) Please keep in mind that the hostname and login message have been removed from the script as they contain identifiable information for my server. Enjoy this, and happy hacking! &#8211; I would also like to point out I wouldn&#8217;t have done this, at least as quickly, if it wasn&#8217;t for Ajurna of the mighty IrishPirates!</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">socket</span>
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">string</span>
&nbsp;
boHost = <span style="color: #483d8b;">&quot;&quot;</span>
boPort = <span style="color: #ff4500;">3074</span>
boAddr = <span style="color: black;">&#40;</span>boHost, boPort<span style="color: black;">&#41;</span>
&nbsp;
boLoginMsg = <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>ff<span style="color: #000099; font-weight: bold;">\x</span>ff<span style="color: #000099; font-weight: bold;">\x</span>ff<span style="color: #000099; font-weight: bold;">\x</span>ff<span style="color: #000099; font-weight: bold;">\x</span>00___OMITTED____<span style="color: #000099; font-weight: bold;">\x</span>20<span style="color: #000099; font-weight: bold;">\x</span>64<span style="color: #000099; font-weight: bold;">\x</span>76<span style="color: #000099; font-weight: bold;">\x</span>61<span style="color: #000099; font-weight: bold;">\x</span>72<span style="color: #000099; font-weight: bold;">\x</span>6c<span style="color: #000099; font-weight: bold;">\x</span>69<span style="color: #000099; font-weight: bold;">\x</span>73<span style="color: #000099; font-weight: bold;">\x</span>74<span style="color: #000099; font-weight: bold;">\x</span>00&quot;</span>
&nbsp;
udpSock = <span style="color: #dc143c;">socket</span>.<span style="color: #dc143c;">socket</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">socket</span>.<span style="color: black;">AF_INET</span>, <span style="color: #dc143c;">socket</span>.<span style="color: black;">SOCK_DGRAM</span><span style="color: black;">&#41;</span>
boSentBytes = udpSock.<span style="color: black;">sendto</span><span style="color: black;">&#40;</span>boLoginMsg, boAddr<span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: black;">&#40;</span>boSentBytes <span style="color: #66cc66;">&lt;</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span>boLoginMsg<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Message not sent...&quot;</span><span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">else</span>:
    <span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Message sent...&quot;</span><span style="color: black;">&#41;</span>
&nbsp;
boRecv = udpSock.<span style="color: black;">recv</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">4096</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span>boRecv<span style="color: black;">&#41;</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #ff4500;">0</span>:
    <span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Received &quot;</span>, boRecv<span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">else</span>:
    <span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Received Nothing...&quot;</span><span style="color: black;">&#41;</span>
&nbsp;
udpSock.<span style="color: black;">close</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
fileHandler = <span style="color: #008000;">open</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;out.txt&quot;</span>, <span style="color: #483d8b;">&quot;w&quot;</span><span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #66cc66;">&gt;&gt;</span> fileHandler, boRecv</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://hackdev.com/2010/11/call-of-duty-black-ops-cracked/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>New theme for a new server!</title>
		<link>http://hackdev.com/2010/10/new-theme-for-a-new-server/</link>
		<comments>http://hackdev.com/2010/10/new-theme-for-a-new-server/#comments</comments>
		<pubDate>Mon, 18 Oct 2010 22:28:41 +0000</pubDate>
		<dc:creator>Gues7</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Roll your own:]]></category>
		<category><![CDATA[Server]]></category>

		<guid isPermaLink="false">http://hackdev.com/?p=219</guid>
		<description><![CDATA[Howdy Folks, I have been working hard here in the background getting rid of all of my hosting accounts and consolidating everything into one (relatively) easy to manage VPS or Virtual Private Server which I got for cheap from the &#8230; <a href="http://hackdev.com/2010/10/new-theme-for-a-new-server/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Howdy Folks,</p>
<p>I have been working hard here in the background getting rid of all of my hosting accounts and consolidating everything into one (relatively) easy to manage VPS or Virtual Private Server which I got for cheap from the guys (and presumably girls) at <a title="ThrustVPS.com" href="https://clients.thrustvps.com/aff.php?aff=152">ThrustVPS</a> who seem to be running  tight ship, I don&#8217;t have any stats on uptime or that so far; but everything has gone smoothly. And when they say instant setup, they mean it.</p>
<p>Thats enough of plugging someone else&#8217;s company for now&#8230; not that I have my own to run&#8230; yet. I have managed so far to implement a custom firewall that suits my needs quite nicely, my own email system, the general webserver / mySQL server etc&#8230; and all seems to be running very smoothly for such a cheap box, I do intend however to document all of the install processes I have gone through to get this far, and if your really nice, I might even share my custom backup script with y&#8217;all.</p>
<p>Anyways, I just said I would pop on and give a quick update before I get to bed for work.</p>
]]></content:encoded>
			<wfw:commentRss>http://hackdev.com/2010/10/new-theme-for-a-new-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Firewalls &#8211; Attack detection and response with iptables, PSAD, and FWSNORT.</title>
		<link>http://hackdev.com/2010/09/linux-firewalls-attack-detection-and-response-with-iptables-psad-and-fwsnort/</link>
		<comments>http://hackdev.com/2010/09/linux-firewalls-attack-detection-and-response-with-iptables-psad-and-fwsnort/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 02:13:49 +0000</pubDate>
		<dc:creator>Gues7</dc:creator>
				<category><![CDATA[Book Review]]></category>
		<category><![CDATA[Server]]></category>

		<guid isPermaLink="false">http://hackdev.com/?p=169</guid>
		<description><![CDATA[I seem to work best at night, it&#8217;s dark out, and generally quite dark inside too; there is more bandwidth because it is off peek, and in general there is nobody coming over or phoning and interrupting me. Incidentally, its &#8230; <a href="http://hackdev.com/2010/09/linux-firewalls-attack-detection-and-response-with-iptables-psad-and-fwsnort/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I seem to work best at night, it&#8217;s dark out, and generally quite dark inside too; there is more bandwidth because it is off peek, and in general there is nobody coming over or phoning and interrupting me. Incidentally, its also when I do the majority of my reading, at home; in bed, at night. Much more pleasant that way&#8230;<br />
PSAD<br />
Anyway, the latest book I have been reading is called &#8220;<a title="Linux Firewalls" href="http://www.amazon.com/gp/product/1593271417?ie=UTF8&amp;tag=hackdcom-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1593271417&quot;&gt;Linux Firewalls" target="_self">Linux Firewalls &#8211; Attack detection and response with iptables, PSAD and FWSNORT</a>&#8221; by Michael Rash who, incidentally runs CipherDyne.org &#8211; the site where <strong>PSAD</strong>, <strong>FWSNORT</strong> and a fair few other Linux and security tools are developed. Now, you may think that with a title like that your going to have to know a lot about Linux and Firewalls before you begin but that is simply not true, <a title="Linux Firewalls" href="http://www.amazon.com/gp/product/1593271417?ie=UTF8&amp;tag=hackdcom-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1593271417&quot;&gt;Linux Firewalls" target="_self">Linux Firewalls</a> takes you right from the very start of how <strong>iptables</strong> works to manually porting Snort rules over to <strong>iptables</strong> for detection, and in my humble opinion, it does a damn good job of it. In fact, it done such a good job of it, I have used the reference firewall scripts and <strong>PSAD</strong> configurations to install and configure <strong>iptables</strong> and <strong>PSAD</strong> on my new VPS, which I will hopefully be moving some of my sites to.</p>
<p>Some of the things you should probably have already if you want to get the best out of <a title="Linux Firewalls" href="http://www.amazon.com/gp/product/1593271417?ie=UTF8&amp;tag=hackdcom-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1593271417&quot;&gt;Linux Firewalls" target="_self">Linux Firewalls</a> is&#8230;</p>
<ul>
<li>A comfortable familiarity with the distribution of Linux you wish to use.</li>
<li>Basic understanding of how networks communicate.</li>
<li>Reasonable understanding of how TCP works (ie. the three way handshake)</li>
<li>Reasonable understanding of how UDP works</li>
<li>A system to test this stuff on, if you don&#8217;t have a system to test this stuff out on, you could always set up a few virtual machines using VirtualBox or VMWare.</li>
<li>A will to learn about this kind of stuff</li>
</ul>
<p>Missing any one of these things (except the will to learn, thats pretty important) probably isn&#8217;t going to be a huge deal, but if your missing a lot of them, you might struggle a bit with some of the concepts.</p>
<p>Here is a sample of one of the basic <a href="http://www.amazon.com/gp/product/1593271417?ie=UTF8&amp;tag=hackdcom-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1593271417" target="_self">Linux Firewall</a> scripts that I have adapted from the book&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#Port and IP addresses changed to protect the innocent.</span>
&nbsp;
<span style="color: #007800;">IPTABLES</span>=<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables
<span style="color: #007800;">MODPROBE</span>=<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>modprobe
&nbsp;
<span style="color: #666666; font-style: italic;">### Flush existing rules and settings. Set to default drop.</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;[+] Flushing existing iptables rules...&quot;</span>
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-F</span>
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-X</span>
<span style="color: #666666; font-style: italic;">#$IPTABLES -t nat -F</span>
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-P</span> INPUT DROP
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-P</span> OUTPUT DROP
<span style="color: #666666; font-style: italic;">#$IPTABLES -P FORWARD DROP</span>
&nbsp;
<span style="color: #666666; font-style: italic;">### Load the connection tracking modules. Not going to bother with NAT</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;[+] Loading conntrack support...&quot;</span>
<span style="color: #007800;">$MODPROBE</span> ip_conntrack
<span style="color: #007800;">$MODPROBE</span> ip_conntrack_ftp
&nbsp;
<span style="color: #666666; font-style: italic;">### Input Chain</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;[+] Setting up INPUT chain...&quot;</span>
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-m</span> state <span style="color: #660033;">--state</span> INVALID <span style="color: #660033;">-j</span> LOG <span style="color: #660033;">--log-prefix</span> <span style="color: #ff0000;">&quot;DROP INVALID &quot;</span> <span style="color: #660033;">--log-ip-options</span> <span style="color: #660033;">--log-tcp-options</span>
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-m</span> state <span style="color: #660033;">--state</span> INVALID <span style="color: #660033;">-j</span> DROP
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-m</span> state <span style="color: #660033;">--state</span> ESTABLISHED,RELATED <span style="color: #660033;">-j</span> ACCEPT
&nbsp;
<span style="color: #666666; font-style: italic;">### Allowing Broadcasts</span>
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-d</span> 255.255.255.255 <span style="color: #660033;">-j</span> ACCEPT
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-d</span> x.x.x.x <span style="color: #660033;">-j</span> ACCEPT <span style="color: #666666; font-style: italic;">#Replace the x's with your network's broadcast address</span>
&nbsp;
<span style="color: #666666; font-style: italic;">### Anti-spoofing measures</span>
<span style="color: #666666; font-style: italic;">#$IPTABLES -A INPUT -i eth0 -j LOG --log-prefix &quot;SPOOFED PKT &quot;</span>
<span style="color: #666666; font-style: italic;">#$IPTABLES -A INPUT -i eth0 -j DROP</span>
&nbsp;
<span style="color: #666666; font-style: italic;">### Accept rules...</span>
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-i</span> lo <span style="color: #660033;">-j</span> ACCEPT <span style="color: #666666; font-style: italic;">#All local connections</span>
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-i</span> eth0 <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">80</span> <span style="color: #660033;">--syn</span> <span style="color: #660033;">-m</span> state <span style="color: #660033;">--state</span> NEW <span style="color: #660033;">-j</span> ACCEPT <span style="color: #666666; font-style: italic;">#Webserver</span>
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-i</span> eth0 <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">22</span> <span style="color: #660033;">--syn</span> <span style="color: #660033;">-m</span> state <span style="color: #660033;">--state</span> NEW <span style="color: #660033;">-j</span> ACCEPT <span style="color: #666666; font-style: italic;">#SSHd</span>
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-i</span> eth0 <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">1000</span> <span style="color: #660033;">--syn</span> <span style="color: #660033;">-m</span> state <span style="color: #660033;">--state</span> NEW <span style="color: #660033;">-j</span> ACCEPT <span style="color: #666666; font-style: italic;">#Webmin</span>
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> icmp <span style="color: #660033;">--icmp-type</span> echo-request <span style="color: #660033;">-j</span> ACCEPT <span style="color: #666666; font-style: italic;">#Accept Ping's</span>
&nbsp;
<span style="color: #666666; font-style: italic;">### Output Chain</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;[+] Setting up OUTPUT chain - Allowing all!&quot;</span>
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> OUTPUT <span style="color: #660033;">-j</span> ACCEPT
&nbsp;
<span style="color: #666666; font-style: italic;">### Forward Chain</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;[+] Setting up FORWARD chain - Nothing to do.&quot;</span>
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> FORWARD <span style="color: #660033;">-j</span> LOG <span style="color: #660033;">--log-prefix</span> <span style="color: #ff0000;">&quot;DROP FORWARD &quot;</span> <span style="color: #660033;">--log-ip-options</span> <span style="color: #660033;">--log-tcp-options</span>
<span style="color: #007800;">$IPTABLES</span> <span style="color: #660033;">-A</span> FORWARD <span style="color: #660033;">-j</span> DROP</pre></div></div>

<p>I hope that this impromptu book review is of at least some help to you.</p>
<p>Side Note: The bold bits in the posting are for a little test that I  am doing on keyword density&#8230; I&#8217;ll let you all know how it goes.</p>
]]></content:encoded>
			<wfw:commentRss>http://hackdev.com/2010/09/linux-firewalls-attack-detection-and-response-with-iptables-psad-and-fwsnort/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Teamspeak 3 server on Ubuntu</title>
		<link>http://hackdev.com/2009/12/teamspeak-3-server-on-ubuntu/</link>
		<comments>http://hackdev.com/2009/12/teamspeak-3-server-on-ubuntu/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 10:59:31 +0000</pubDate>
		<dc:creator>Gues7</dc:creator>
				<category><![CDATA[Gaming]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Roll your own:]]></category>
		<category><![CDATA[Server]]></category>

		<guid isPermaLink="false">http://hackdev.com/?p=100</guid>
		<description><![CDATA[Well, Teamspeak have finally released their new server platform for a public BETA test, although supposedly in this state the code is not meant to be stable, it appears to be working quite well on my Ubuntu server here at &#8230; <a href="http://hackdev.com/2009/12/teamspeak-3-server-on-ubuntu/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Well, Teamspeak have finally released their new server platform for a public BETA test, although supposedly in this state the code is not meant to be stable, it appears to be working quite well on my Ubuntu server here at home. This is what I done to get it up and running &#8211; as a service from init.d no less.  Before doing any of the following steps, please be aware that this <strong>IS</strong> BETA code and <strong>WILL</strong> contain bugs that may introduce security issues.  The first step is to create a user that the Teamspeak executable can run as, this user should have a complex password for security reasons. This user will also not require a shell account.</p>
<blockquote><p>sudo adduser teamspeak</p></blockquote>
<p>Fill in the questions presented by the adduser application.</p>
<blockquote><p>sudo usermod -s /bin/false teamspeak</p></blockquote>
<p>The above command will change the users shell to be /bin/false ie. no shell.  Now it is time to go and get Teamspeak&#8230; visit http://www.goteamspeak.com and find the correct package for the architecture you wish to use ie. Teamspeak_3.0.0-Beta5-32bit&#8230;</p>
<blockquote><p>wget http://ftp.4players.de/pub/hosted/ts3/releases/beta-5/teamspeak3-server_linux-x86-3.0.0-beta5.tar.gz tar -zxvf teamspeak3-server_linux-x86-3.0.0-beta5.tar.gz</p></blockquote>
<p>Now its time to move the new TS3 directory to its new home&#8230;</p>
<blockquote><p>sudo mv ./teamspeak3-server_linux-x86-3.0.0-beta5 /opt/TS3 sudo chown -R teamspeak /opt/TS3</p></blockquote>
<p>The above will place TS3 in /opt/TS3 and give ownership of the contents to the user teamspeak.  It is now possible to run Teamspeak, however as veteran Teamspeak users will know, the first time you run the Teamspeak server you are presented with a username/password combo that cannot be recovered without resetting the server. In TS3 you will also be presented with a `token` (all of this is described in the Teamspeak documentation). So for the first run, the following command will allow you to gather these details, they should be noted carefully for future reference.</p>
<blockquote><p>sudo start-stop-daemon &#8211;chuid teamspeak &#8211;chdir /opt/TS3 &#8211;start &#8211;exec /opt/TS3/ts3server_linux_x86</p></blockquote>
<p>From this, you should see the serveradmin user and password. You can now ^C that and be returned to the normal shell, if you cat /opt/TS3/logs/* you will be presented with the token you require to obtain server-admin status on the new server. The last part is to create a script for /etc/init.d/ to launch Teamspeak each time the system is booted to the correct runlevel. /etc/init.d/skeleton provides a suitable framework for this, here is the script I am using, just about&#8230; <strong>NOTE:</strong> WordPress does not want to format this correctly for me, as such, here is a link to the file in a tar archive. If you follow these instructions and are running a 32bit server, the following file will work out of the box. <a href="http://hackdev.com/wp-content/uploads/2009/12/teamspeak.gz">/etc/init.d/teamspeak</a> This file must then be made executable with</p>
<blockquote><p>sudo chmod +x /etc/init.d/teamspeak</p></blockquote>
<p>And finally, the init file must be symlinked to each of the runlevel start dirs using the following&#8230;</p>
<blockquote><p>sudo ln -s ../init.d/teamspeak /etc/rc0.d/K21teamspeak sudo ln -s ../init.d/teamspeak /etc/rc1.d/K21teamspeak sudo ln -s ../init.d/teamspeak /etc/rc2.d/S21teamspeak sudo ln -s ../init.d/teamspeak /etc/rc3.d/S21teamspeak sudo ln -s ../init.d/teamspeak /etc/rc4.d/S21teamspeak sudo ln -s ../init.d/teamspeak /etc/rc5.d/S21teamspeak sudo ln -s ../init.d/teamspeak /etc/rc6.d/K21teamspeak</p></blockquote>
<p>Viola, you should now have a working Teamspeak 3 server.</p>
<p>BOOTNOTE:</p>
<blockquote><p>For my initial install, and for the basis of the majority of <a href="http://ubuntuforums.org/showthread.php?t=236834" target="_blank">this</a>, I used this as a reference.  Items listed in <strong>bold</strong> with <strong>**</strong> are most likely not the correct file names for the command, I am not close to my server or an available shell to pull the correct parameters at present, but I will update ASAP.  As an additional side note, my first impressions of TS3 are very good&#8230; It has tons of new features, looks good and the voice quality is very good indeed. My only concern is however the permissions system is very bulky, difficult to understand, and unless you are reasonably familiar with administering a Teamspeak server already, the documentation is not as straight forward as people believe. Still, however, a great job. Well done Teamspeak 3 development team!</p></blockquote>
<p><em><strong>UPDATE:</strong></em> Fixed formatting issue, kinda&#8230; provided link to pastebin.</p>
<p><strong>UPDATE:</strong> Fixed information regarding server executable. Added /etc/init.d/teamspeak file, available for download <a href="http://hackdev.com/wp-content/uploads/2009/12/teamspeak.gz">here</a>, removed pastebin link.</p>
<blockquote>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 744px; width: 1px; height: 1px;">
<pre class="alt2" style="border: 1px inset; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 498px; text-align: left;" dir="ltr">#! /bin/sh
### BEGIN INIT INFO
# Provides:          teamspeak
# Required-Start:    networking
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:      S 0 1 6
# Short-Description: TeamSpeak Server Daemon
# Description:       Starts/Stops/Restarts the TeamSpeak Server Daemon
### END INIT INFO

set -e

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="TeamSpeak Server"
NAME=teamspeak
USER=teamspeak
DIR=/opt/tss2_rc2
DAEMON=$DIR/server_linux
#PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0

d_start() {
        start-stop-daemon --start --quiet \
                --chuid $USER \
                --chdir $DIR \
                --exec $DAEMON \
                &gt; /dev/null \
                || echo -n " already running"
}

d_stop() {
        start-stop-daemon --stop --quiet \
                --chuid $USER \
                --chdir $DIR \
                --exec $DAEMON \
                || echo -n " not running"
}

case "$1" in
  start)
        echo -n "Starting $DESC: $NAME"
        d_start
        echo "."
        ;;
  stop)
        echo -n "Stopping $DESC: $NAME"
        d_stop
        echo "."
        ;;
  restart|force-reload)
        echo -n "Restarting $DESC: $NAME"
        d_stop
        sleep 15
        d_start
        echo "."
        ;;
  *)
        echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" &gt;&amp;2
        exit 3
        ;;
esac

exit 0</pre>
</div>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://hackdev.com/2009/12/teamspeak-3-server-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Brute force SSH attacks.</title>
		<link>http://hackdev.com/2009/12/brute-force-ssh-attacks/</link>
		<comments>http://hackdev.com/2009/12/brute-force-ssh-attacks/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 03:07:52 +0000</pubDate>
		<dc:creator>Gues7</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network]]></category>

		<guid isPermaLink="false">http://hackdev.com/?p=97</guid>
		<description><![CDATA[I have spoken to a good few people and on the matter and one thing they consistantly ask is &#8220;How do I know my server is under attack?&#8221;, its simple really&#8230; if you keep a close eye (in Ubuntu at &#8230; <a href="http://hackdev.com/2009/12/brute-force-ssh-attacks/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have spoken to a good few people and on the matter and one thing they consistantly ask is &#8220;How do I know my server is under attack?&#8221;, its simple really&#8230; if you keep a close eye (in Ubuntu at least) on /var/log/auth.log, you can see all login attempts on the system. Here is an example log of a brute force attack on my very own server&#8230;</p>
<blockquote><p>Dec  7 01:30:02 phonebox sshd[14378]: Invalid user aleph from 60.19.28.27<br />
Dec  7 01:30:02 phonebox sshd[14378]: pam_unix(sshd:auth): check pass; user unknown<br />
Dec  7 01:30:02 phonebox sshd[14378]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=60.19.28.27<br />
Dec  7 01:30:04 phonebox sshd[14378]: Failed password for invalid user aleph from 60.19.28.27 port 16699 ssh2<br />
Dec  7 01:30:08 phonebox sshd[14461]: Invalid user pechantal from 60.19.28.27<br />
Dec  7 01:30:08 phonebox sshd[14461]: pam_unix(sshd:auth): check pass; user unknown<br />
Dec  7 01:30:08 phonebox sshd[14461]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=60.19.28.27<br />
Dec  7 01:30:10 phonebox sshd[14461]: Failed password for invalid user pechantal from 60.19.28.27 port 17732 ssh2<br />
Dec  7 01:30:14 phonebox sshd[14464]: Invalid user komtemp from 60.19.28.27<br />
Dec  7 01:30:14 phonebox sshd[14464]: pam_unix(sshd:auth): check pass; user unknown<br />
Dec  7 01:30:14 phonebox sshd[14464]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=60.19.28.27<br />
Dec  7 01:30:16 phonebox sshd[14464]: Failed password for invalid user komtemp from 60.19.28.27 port 18807 ssh2<br />
Dec  7 01:30:20 phonebox sshd[14466]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=60.19.28.27  user=root<br />
Dec  7 01:30:22 phonebox sshd[14466]: Failed password for root from 60.19.28.27 port 19764 ssh2<br />
Dec  7 01:30:54 phonebox sshd[14470]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=60.19.28.27  user=root<br />
Dec  7 01:30:56 phonebox sshd[14470]: Failed password for root from 60.19.28.27 port 26354 ssh2<br />
Dec  7 01:30:59 phonebox sshd[14473]: Invalid user test from 60.19.28.27<br />
Dec  7 01:31:00 phonebox sshd[14473]: pam_unix(sshd:auth): check pass; user unknown<br />
Dec  7 01:31:00 phonebox sshd[14473]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=60.19.28.27<br />
Dec  7 01:31:01 phonebox sshd[14473]: Failed password for invalid user test from 60.19.28.27 port 27410 ssh2<br />
Dec  7 01:31:05 phonebox sshd[14475]: Invalid user teste from 60.19.28.27<br />
Dec  7 01:31:05 phonebox sshd[14475]: pam_unix(sshd:auth): check pass; user unknown<br />
Dec  7 01:31:05 phonebox sshd[14475]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=60.19.28.27<br />
Dec  7 01:31:07 phonebox sshd[14475]: Failed password for invalid user teste from 60.19.28.27 port 28724 ssh2<br />
Dec  7 01:31:10 phonebox sshd[14477]: Invalid user teste from 60.19.28.27<br />
Dec  7 01:31:10 phonebox sshd[14477]: pam_unix(sshd:auth): check pass; user unknown<br />
Dec  7 01:31:10 phonebox sshd[14477]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=60.19.28.27<br />
Dec  7 01:31:12 phonebox sshd[14477]: Failed password for invalid user teste from 60.19.28.27 port 29661 ssh2<br />
Dec  7 01:31:15 phonebox sshd[14479]: Invalid user teste from 60.19.28.27<br />
Dec  7 01:31:16 phonebox sshd[14479]: pam_unix(sshd:auth): check pass; user unknown<br />
Dec  7 01:31:16 phonebox sshd[14479]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=60.19.28.27<br />
Dec  7 01:31:18 phonebox sshd[14479]: Failed password for invalid user teste from 60.19.28.27 port 30627 ssh2<br />
Dec  7 01:31:21 phonebox sshd[14482]: Invalid user pa$$w0rd from 60.19.28.27<br />
Dec  7 01:31:22 phonebox sshd[14482]: pam_unix(sshd:auth): check pass; user unknown<br />
Dec  7 01:31:22 phonebox sshd[14482]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=60.19.28.27<br />
Dec  7 01:31:23 phonebox sshd[14482]: Failed password for invalid user pa$$w0rd from 60.19.28.27 port 31753 ssh2<br />
Dec  7 01:31:26 phonebox sshd[14484]: Invalid user testing from 60.19.28.27<br />
Dec  7 01:31:27 phonebox sshd[14484]: pam_unix(sshd:auth): check pass; user unknown<br />
Dec  7 01:31:27 phonebox sshd[14484]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=60.19.28.27<br />
Dec  7 01:31:28 phonebox sshd[14484]: Failed password for invalid user testing from 60.19.28.27 port 32702 ssh2<br />
Dec  7 01:31:32 phonebox sshd[14486]: Invalid user tst from 60.19.28.27<br />
Dec  7 01:31:32 phonebox sshd[14486]: pam_unix(sshd:auth): check pass; user unknown<br />
Dec  7 01:31:32 phonebox sshd[14486]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=60.19.28.27<br />
Dec  7 01:31:35 phonebox sshd[14486]: Failed password for invalid user tst from 60.19.28.27 port 33652 ssh2<br />
Dec  7 01:31:38 phonebox sshd[14489]: Invalid user spam from 60.19.28.27<br />
Dec  7 01:31:38 phonebox sshd[14489]: pam_unix(sshd:auth): check pass; user unknown<br />
Dec  7 01:31:38 phonebox sshd[14489]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=60.19.28.27<br />
Dec  7 01:31:40 phonebox sshd[14489]: Failed password for invalid user spam from 60.19.28.27 port 34704 ssh2</p></blockquote>
<p>Now, there is a lot more activity in the log than this, however this should give the general idea of what to look out for&#8230; If you happen to be lucky enough to have a MikroTik router, you can help slow or prevent this with some creative firewall rules, here are the rules I am using for this, as provided in the MikroTik WiKi.</p>
<blockquote><p>/ip firewall filter add chain=input protocol=tcp dst-port=22 src-address-list=ssh_blacklist action=drop comment=&#8221;drop ssh brute forcers&#8221; disabled=no<br />
/ip firewall filter add chain=input protocol=tcp dst-port=22 connection-state=new src-address-list=ssh_stage3 action=add-src-to-address-list address-list=ssh_blacklist address-list-timeout=10d comment=&#8221;" disabled=no<br />
/ip firewall filter add chain=input protocol=tcp dst-port=22 connection-state=new src-address-list=ssh_stage2 action=add-src-to-address-list address-list=ssh_stage3 address-list-timeout=1m comment=&#8221;" disabled=no<br />
/ip firewall filter add chain=input protocol=tcp dst-port=22 connection-state=new src-address-list=ssh_stage1 action=add-src-to-address-list address-list=ssh_stage2 address-list-timeout=1m comment=&#8221;" disabled=no<br />
/ip firewall filter add chain=input protocol=tcp dst-port=22 connection-state=new action=adadd chain=forward protocol=tcp dst-port=22 src-address-list=ssh_blacklist action=drop comment=&#8221;drop ssh brute downstream&#8221; disabled=nod-src-to-address-list address-list=ssh_stage1 address-list-timeout=1m comment=&#8221;" disabled=no</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://hackdev.com/2009/12/brute-force-ssh-attacks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Roll your Own: Wide Area Network (WAN) pt.2</title>
		<link>http://hackdev.com/2009/07/roll-your-own-wide-are-network-wan-pt-2/</link>
		<comments>http://hackdev.com/2009/07/roll-your-own-wide-are-network-wan-pt-2/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 21:43:34 +0000</pubDate>
		<dc:creator>Gues7</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Roll your own:]]></category>

		<guid isPermaLink="false">http://hackdev.com/?p=52</guid>
		<description><![CDATA[Ok, so there hasn&#8217;t been all that much movement on this project as of yet, but I do have a lot of ideas for it and I am in the proccess of aquiring parts. At the minute, I have the &#8230; <a href="http://hackdev.com/2009/07/roll-your-own-wide-are-network-wan-pt-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ok, so there hasn&#8217;t been all that much movement on this project as of yet, but I do have a lot of ideas for it and I am in the proccess of aquiring parts. At the minute, I have the following embedded boards to use,</p>
<ul>
<li>PC Engines Alix .3C</li>
<li>PC Engines Wrap .1D</li>
<li>PC Engines Wrap .2C</li>
<li>PC Engines Wrap .1C</li>
<li>RB-532 (Routerboard running MicroTik firmware)</li>
<li>RB-564 (Routerboard Expansion Module)</li>
</ul>
<p>For storage, I have 5x 128mb CF cards and 1x 2GB CF card. I also have 3x PoE injectors (the quick and dirty kind), 3x CM9 radio cards, and 1x 27dBi omni-directional antenna for 2.4GHz (which by the way, is awesome)</p>
<p>For servers, I still have PhoneBox, a 1.6GHz Intel Atom mini-ITX machine, I am working on getting a new, shiny rackmount dual core 1.6GHz machine too so that will be two servers for a start. I have also managed to aquire a racking case thats 600mm deep and has the capacity for around 12u, although it is missing its front bezel rails &#8211; I&#8217;m fairly confident I can find them somewhere in work. Im working on getting a new (2nd hand) patch pannel to keep everything neat and tidy too. Next on my list of things to do is to get a PSU built that can run all of this equipment with UPS functionality, I do have a 3A power plex box here that I also got from FWI, however it is not working at the moment, I beleive it is the power FET thats gone and it should be a simple chop &amp; change replacement. Failing that, I will design a SLA charging circuit and feed the 12v supply from the transformer, and the 12v supply from the SLA bank into a comparator for fast switching on a power cut. I would like to have a UPS that can maintin the routing infrastructure during an outage for 16-24 hours. As the (soon to be) two Mini-ITX servers also run off 12v, I would like to have these included in the UPS scheme for a few reasons,</p>
<ol>
<li>A transformer at max-efficiency can only be around 85%, less transformers (power blocks etc&#8230;) means less power lost and a smaller electricity bill.</li>
<li>The servers will be running Linux, which in some (lots of) cases, it doesnt like just having its power yanked.</li>
<li>Everthing will be in a centralised location (at least at my station) so it will mean less wiring.</li>
<li>Everything can then be rackmounted, and there would only be a single mains feed.</li>
</ol>
<p>I am currently trying to draw a sufficient network topology plan including wiring and subnetting for my station to allow for easy management &amp; high security. This also involves selecting what services will be provided on the network here &#8211; more on this later.</p>
]]></content:encoded>
			<wfw:commentRss>http://hackdev.com/2009/07/roll-your-own-wide-are-network-wan-pt-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Roll your Own: Wide Area Network (WAN)</title>
		<link>http://hackdev.com/2009/06/roll-your-own-wide-area-network-wan/</link>
		<comments>http://hackdev.com/2009/06/roll-your-own-wide-area-network-wan/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 23:51:32 +0000</pubDate>
		<dc:creator>Gues7</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Roll your own:]]></category>

		<guid isPermaLink="false">http://hackdev.com/?p=46</guid>
		<description><![CDATA[Thanks to my friends over at Fast Wireless Internet, I now have my own ISP grade wireless equipment. I will be using this (hopefully) to build a wireless link from my house in Dublin, to my parents (and my mates) &#8230; <a href="http://hackdev.com/2009/06/roll-your-own-wide-area-network-wan/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Thanks to my friends over at <a title="Fast Wireless Internet" href="http://www.fwi.ie" target="_blank">Fast Wireless Internet</a>, I now have my own ISP grade wireless equipment. I will be using this (hopefully) to build a wireless link from my house in Dublin, to my parents (and my mates) house in Laois. this is a wireless link of over 50km so proper preparation is paramount. The main idea is to have two directional antennae on each site, one for TX and one for RX, coupled with this will be a standard (high gain) omni-directional for spread coverage of the surrounding area.</p>
<p>The main equipment that is going to be used is RouterBoards running the Micro-Tik (Linux based) operating system, 5.8Ghz Wireless cards and some high gain, narrow beam (~7°) dish style antennae. The house in Dublin will have an extended mounting post fixed to the roof, while the house in Laois already has access to a nice big shiny mast (and a wind turbine)</p>
<p>I&#8217;m also in the middle of working on some security features for this, y&#8217;know wireless isn&#8217;t all that secure&#8230; so I will be using MAC filtering, WPA2, Radius and possibly passive IDS &amp; Network monitoring. The Micro-Tik will take care of the first two, but I&#8217;ll be implementing a PFSense system on a PC Engines Wrap.1D too.</p>
<p>In order to house all of this equipment, I will be building a small(ish) NOC or Network Operations Centre in my attic, an more than likely my mate will just add the new equipment to the NOC thats already on his end. As a part of this NOC build, I will be making (meh, repairing) a 12V UPS and fitting it with some high AH batteries, moving my mini-itx to it, and building a custom P0E power distribution system.</p>
<p>All in all, its going to be a big, interesting project&#8230; I&#8217;ll keep you posted!</p>
]]></content:encoded>
			<wfw:commentRss>http://hackdev.com/2009/06/roll-your-own-wide-area-network-wan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Roll your Own: CS:S Server (Part 3)</title>
		<link>http://hackdev.com/2009/05/roll-your-own-css-server-part-3/</link>
		<comments>http://hackdev.com/2009/05/roll-your-own-css-server-part-3/#comments</comments>
		<pubDate>Fri, 01 May 2009 21:08:58 +0000</pubDate>
		<dc:creator>Gues7</dc:creator>
				<category><![CDATA[Game Server]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Roll your own:]]></category>

		<guid isPermaLink="false">http://hackdev.com/?p=41</guid>
		<description><![CDATA[Ok, so from Part 1 and Part 2, you should now have a working Counter-Strike:Source server up and running, with Mani-Admin for your administration. Here is how to get MetaMod Source installed&#8230; this is going to be a really simple &#8230; <a href="http://hackdev.com/2009/05/roll-your-own-css-server-part-3/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ok, so from <a href="http://hackdev.com/?p=9">Part 1</a> and <a href="http://hackdev.com/?p=30">Part 2</a>, you should now have a working Counter-Strike:Source server up and running, with Mani-Admin for your administration. Here is how to get MetaMod Source installed&#8230; this is going to be a really simple quick one to go on&#8230;</p>
<blockquote><p># cd /&lt;yourserver&gt;/cstrike/addons<br />
# wget http://sourcemod.steamfriends.com/files/mmsource-1.7.1.tar.gz<br />
# tar -zxvf mmsource-1.7.1.tar.gz<br />
# rm mmsource-1.7.1.tar.gz</p></blockquote>
<p>Ok, now we have MetaMod downloaded and extracted into the correct directory, last thing we need to do is create a VDF file to load it, MetaMod have a great VDF generator here or you can do the following&#8230;</p>
<blockquote><p># touch metamod.vdf<br />
# pico metamod.vdf</p></blockquote>
<p>Once in pico, paste the following text in ([shift]+[insert]), save with [ctrl]+o and exit with [ctrl]+x</p>
<blockquote><p>&#8220;Plugin&#8221;<br />
{<br />
&#8220;file&#8221;	&#8220;../cstrike/addons/metamod/bin/server_i486.so&#8221;<br />
}</p></blockquote>
<p>You can now restart your server and double check that MetaMod is running by typing &#8220;meta version&#8221; into the console. All done!</p>
]]></content:encoded>
			<wfw:commentRss>http://hackdev.com/2009/05/roll-your-own-css-server-part-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

