Monthly Archives: February 2012

You are browsing the site archives by month.

Securing your Windows Dedicated Server

How To Block Hackers and Remote Desktop Attempts In Windows Server 2008 or newer

Download IPBan For Free

Visit this Project on GitHub





Is your Windows server getting hacked? Do you need to block ip addresses in Windows? Dealing with a brute force attack? This article is for you.

The last month or so I noticed a disturbing trend in the event viewer on one of our dedicated windows servers. We were getting thousands of failed login attempts to terminal services (remote desktop). I decided I would enable the terminal services auto-ban, so after 5 login attempts the ip address would get banned for 24 hours. This only solved part of the problem, as the attacker continued to flood our server with requests, causing the windows logon process (csrss.exe kept appearing and disappearing in task manager) to continually spin up and shut down. This actually caused significant CPU (10%+) and disk IO as the event viewer continually wrote failed login attempts.

After searching the Interwebs for a better way, I did not find anything that I liked or that didn’t spike my CPU usage, so I decided to make a free tool in C# to auto-ban ip addresses. This tool is constantly improving. Right now it can block ip addresses as found in the event log for audit-failure events. It is very configurable as well.

Features include:
- Duration to ban ip address
- Number of failed login attempts before ban
- Whitelist of comma separated ip addresses or regex to never ban
- Blacklist of comma separated ip addresses or regex to always ban
- Custom prefix to windows firewall rules
- Custom keywords, XPath and Regex to parse event viewer logs for failed login attempts
- Refreshes config so no need to restart the service when you change something
- Highly configurable, ban anything that comes through Windows Event Viewer
- A GREAT and FREE alternative to RdpGuard or Syspeace. Don’t pay for something that should be free! :)

Ships with Windows login failure and MSSQLSERVER login failures by default.
Here’s how to create a Windows service from command prompt:
sc create IPBAN type= own start= auto binPath= d:\system\ipban\ipban.exe DisplayName= IPBAN

*** Requires Windows Vista or Windows Server 2008 or newer ***
*** Make sure to right click on the .zip file you download and select properties, then unblock ***

Mobile Application Growth

Growth

Jeff and I have recently gone full steam ahead in creating mobile applications and games. Before we created a game for the PC and XBOX called Math Asteroids. But we’ve come to realize that mobile is where the trend for device usage is headed and we need to prepare ourselves for the change in mobile application growth.

One way we are preparing is learning Corona SDK to develop for iOS and Android mobile devices. This isn’t to say that the PC is going to go away anytime soon. But over time, we’ll see mobile taking up a larger chunk of space due to mobile application growth. Here’s why.

Mobile Devices Are Easy

Would you rather haul a laptop computer in a bag around with you, or simply have a small little device called a mobile phone which you can put in your pocket? What is easier to access and use and still does most of what you want? The trend of mobile application growth seems to suggest the mobile phone or mobile device.

Here’s a chart showing the growth of mobile devices in 2011 compared to 2010:

Worldwide Smartphone Sales to End Users by Operating System in 4Q11 (Thousands of Units)

Operating System

4Q11

 Units

4Q11 Market Share (%)

4Q10

 Units

4Q10 Market Share (%)

Android

75,906.1

50.9

30,801.2

30.5

iOS

35,456.0

23.8

16,011.1

15.8

Symbian

17,458.4

11.7

32,642.1

32.3

Research In Motion

13,184.5

8.8

14,762.0

14.6

Bada

3,111.3

2.1

2,026.8

2.0

Microsoft

2,759.0

1.9

3,419.3

3.4

Others

1,166.5

0.8

1,487.9

1.5

Total

149,041.8

100.0

101,150.3

100.0

Source: Gartner

Overall, there is a large increase in 2011 mobile device sales (on the left) -vs- 2010 mobile device sales (on the right). Except for poor Research In Motion and Microsoft :)

Let’s face it. It’s much easier to hold a mobile phone in my hand than a laptop. If I use the simple reason that there is less pain to hold a mobile phone than a laptop, I’d know mobile wins. There’s also much less hassle in setting the phone up and running or diagnosing problems. With a PC or MAC, there’s so many parts to manage and work with that it can be frustrating. A mobile phone is one thing – one device and its ease of use is one reason there is mobile application growth.

Mobile Devices Can Do What We Want With Less

Old computer -vs- smart phone

What you see here is a 1982 Osborne Executive portable computer next to a 2007 smartphone. Let’s compare the two in power and ability.

1982 Osborne Executive portable computer

  • Cost: $2,495 (in 1982).
  • Size: 52 x 23 x 33 cm.
  • Weight: 28 lbs.
  • CPU: Z80 4.0 MHz.
  • Memory: 124 KB.

2007 smartphone (Apple iPhone)

  • Cost: $250 (on average)
  • Size: 116 x 61 x 11.6 mm.
  • Weight: 135 grams.
  • CPU: 412 MHz.
  • Memory: 4 GB (up to 16 GB).

Differences between 1982 Osborne and 2007 smartphone

  • Cost: smartphone is 10 times cheaper (adjusted for inflation).
  • Size: smartphone is nearly 500 times smaller (in volume).
  • Weight: smartphone weighs 100 times less.
  • CPU: smartphone CPU is about 100 times faster in clock speed.
  • Memory: smartphone has over 100 times the memory capacity.

Source: Wikipedia

What Are People Doing?

Smart phone’s are a favorite device across all generations, particularly the younger generation. The ability to easily call and text someone makes having a smartphone readily available a must. Add to that smartphone the ability to watch movies, run applications, and take video and pictures and you have a recipe for mobile application growth.

Most people are browsing something on their mobile device, playing around with some application or game, or taking pictures and video. As more and more applications are developed for the smartphone and more and more people use the smartphone, mobile application growth will just continue to explode due to the tremendous market opportunity and usage.

To test this theory, just find a young person and see if they have a mobile phone. What are they doing with it? Go to a company party or work meeting and see how many people have a mobile phone. They are literally everywhere.

Conclusion

Mobile application growth is going to continue to increase. With the increasing power and capability of smartphone’s and mobile devices, along with the convenience and ease of use, mobile applications will be desired to assist and entertain others. The question Jeff and I ask ourselves and maybe you should ask yourself is, “Are you ready to take advantage of this opportunity?”

Learning Corona SDK for iOS and Android Development

 

Learning Corona SDK for iOS and Android Development. One of the challenges of developing games in the mobile space is the number of devices available. There’s iPhones, Android phones, Windows phones, Blackberries (did I just say that one, never mind that, moving on). There’s a variety of devices and several of them are popular, especially the one’s without the name Blackberry in them. So how do we make a game or app that runs on these devices? I mean, isn’t the goal to get on what other people are using?

I’m a Beginner at Mobile Development for iPhone and Android

Jeff and I made Math Asteroids for the XBOX, Windows Phone and PC using C# and the XNA framework. We’re pretty darn good using C# and XNA to make games now (though we still lack in the graphic design/animation part). But we also know that Android and iPhone are kings in the mobile space. If we’re going to tap into the market there, we’ve got to find a way to build games for both easily.

I’m a noobie (a.k.a. beginner) when it comes to mobile development. Jeff (jjxtra) is the master. He’s my twin brother and a co-owner of Digital Ruby with me. Thankfully, I have years of web development and other programming experience, so hopefully picking up and using Corona SDK isn’t going to be that bad. Jeff and I did our research and we think this is our best shot at developing for Android and iPhone simultaneously.

What is Corona SDK?

Corona SDK is a software program that allows one to build applications and games for iOS and Android phones. There’s built in emulator’s that let you see how your program is working. The emulator simulates what it would actually look and feel like on the device of choice. This is handy for me because I’ll know if I’m making something that works or not.

There’s a trial version available on the Corona website. I had to go through a sign up and register process to get the download link. Once I got that, downloading and installing was pretty straightforward. Just remember your username and password because you’ll need it to install the software. My next step is to get a simple application working in the emulator’s the SDK provides. Here’s to hoping game development is easy using this software.

The Journey of Getting My First App Using Corona SDK

My goal is pretty simple with Corona SDK. Get it setup and create my first application or game with some text and possibly something moving around. If I can do that and it doesn’t take hours on end, I’ll start to feel pretty good about this. I’ve also got my twin brother Jeff to ask questions to as a resource. I have a feeling that the information I share about the Corona SDK will be particularly useful for beginner’s like myself – since we’re both in the same boat of having never used it.

If you are going to succeed as a game developer, especially for mobile games, you’ll want something that lets you develop for iPhone and Android simultaneously. Corona SDK is the software of choice Jeff and I are going to use. This is where learning Corona SDK for iOS and Android Development begins. Now to save this article and see what I can do in creating an actual program with Corona SDK…

Prototyping Your Video Games

Pong

In making mobile and video games, there are two main challenges. One is getting the game done. It just takes a sheer amount of effort and focus to finish a game. Because mobile game development is hard, I’d say the majority of people never actually complete their games. The second challenge is getting feedback to know if your game is any good. Sure, you may like your game, but does that translate into others liking it and buying it?

Jeff and I have decided we are going to tackle this challenge by doing a very simple prototype of every game idea we start. We got this idea from learning how a very popular game, Plants -vs- Zombies was made. In that game, an early version was made and changes were made over and over again based on the feedback of other people. We like this idea, so with our upcoming game, code-named “Grow Em,” we are working on doing just that.

What to Prototype With

Jeff and I looked online for something that would allow us to quickly create a first version of our game. Our first instinct was that doing it in JavaScript might be a good idea. Jeff downloaded a JavaScript physics library called Box2D and a JavaScript game engine called Jaws.

However, after 6 hours of frustration, we decided to throw in the towel using JavaScript to prototype. Using Jaws was fairly straightforward, but doing anything physics related or moving elements around on the screen was just too frustrating (i.e. time consuming). We think some people may have success with using JavaScript to prototype or make games, but we’ve consciously decided that it’s not for us. At least not in its current state.

So the question is, how do we do it? Well, we made our very first game together, Math Asteroids using the XNA framework. (Jeff has made 6 other iPhone games and apps by himself). We released the game for Windows, Windows Phone, and XBox. It was built using the XNA game framework. Jeff and I know C# pretty well and over the course of the month of December 2011, we made Math Asteroids. We learned a lot and figured out how to make cool things happen. Because XNA was so fast for us to develop our game in, we’ve decided we will prototype with it.

When Jeff and I first started developing Math Asteroids, we were able to get a very basic version done on the first day. In it, the space ship would answer the same math equation on an asteroid over and over. We got one asteroid to appear on the screen and answer its equation. This was instant feedback for us and we were able to adjust and add features based on our experience with the first prototype.

What we do lack is more people to give us feedback on our prototype. But we have at least the both of us to talk and share ideas, so if you are making a game by yourself, or with a very small team, don’t discount that feedback.  Either way, we’ve found a platform, XNA, which we can make games very fast in and we will continue to use that for the foreseeable future.

Your goal should be one of two things. If you don’t know programming very well, start learning. There’s plenty of XNA and game tutorials on the web. Start reading/watching them and get started with your first very basic version of a game. If you do know programming well, pick a coding platform and run with it. Maybe that’s XNA. Maybe it’s C++. You’ll know your prototyping platform of choice when you can get your first game version up in a day.

What Does a Prototype Look Like?

A prototype is the most basic first version of a game. It is not perfect. It is not pretty. It has only the most basic game play elements. If it’s a first person shooter, you probably have a screen to move around in. Maybe you can even walk on a path or something. But that’s it. Then you take the game and add features from there. Maybe a gun is added to carry and shoot. Maybe you decide you don’t want a first person shooter, but the exploration of a maze instead. This is why it is so important to keep your prototypes basic, small, and simple. You want to be able to adapt them quickly. This is difficult if you spend weeks coding up a game and then later realize it’s not what you or the market wants.

The very top image of this article shows a very old game, Pong. This is a good example for what your prototype should be. Just a basic screen and one or two game play elements. No fancy graphics and no fancy sounds. Just enough to try the game out. In the case of Pong, the paddles move back and forth and hit the balls, and score is kept. That’s it. You could make Super Pong and add new features now, such as aliens interfering with the game, or power ups that the ball can hit to make your paddle grow wider.

Here’s a list of principles to follow when making a prototype for your video game:

  • The first version should be basic, small, and simple. No fancy graphics or sound! Those can come later.
  • Add one or two game play elements to the prototype. These should be simple, like walking, clicking one thing, or testing one simple idea.
  • Find a coding framework that works for you where you can get a first version done in a day. Jeff and I like XNA.
  • If you don’t know how to code and really want to make games, get online and start learning. Plenty of people have written articles and tutorials on the web.
  • Get feedback as quickly as possible on your first prototype. If you have just yourself, ask yourself what should be next. If you have a team, consult them. If you’re at a game company, consider yourself lucky that you have so many people to get feedback from.
  • Enjoy making the prototype. If you’re not having fun, chances are you’re doing a game that isn’t interesting to you, or you really don’t want to make video games. Change course as needed.
  • If you’re ever stuck, use Pong as a reference for how simple your prototype should be. Just the basics.
  • If you don’t know what game to start with, read, “What Game Should I Make?

Moving Beyond the Prototype

Eventually, you’ll want to move beyond prototyping your video games. You might even want to, you know, finish your game. In a future article, I’ll write about how Jeff and I finished our first game and released it for Windows, Windows Phone, and XBox. We know we’ve got a long ways to go still, but completion of your first game is a great milestone. Look for a future article on completing your first game.

Recap

Prototyping your video games is an essential step to making a high quality video game. If you do it right and get the game done on the first day, you can immediately get feedback from anyone who will listen and make adjustments as necessary. Choose your prototyping coding language and just get started. When you finish your first game, give yourself a pat on the back – this is by no means a small and simple feat and you’re in elite company if you do so and Jeff and I salute you.