473,322 Members | 1,431 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Dos Attack Prevention Code

Hi all, I am looking for a Dos Attack Prevention Code in C++ to inspire from,
any suggestions ?

Thank you in advance.
May 17 '10 #1
2 4006
Banfa
9,065 Expert Mod 8TB
What sort of unit are you programming. Prevention of a DoS attack is not particularly trivial and really the responsibility of the company firewall and routers rather than the actual servers.

The very nature of such an attack makes it hard to do anything about. It consists of opening a large number of connections to a server to prevent legitimate connections from being made. The question if you have 10 pending connections during a DoS attack and only one of them is legitimate how do you discern the legitimate one from the other 9?
May 17 '10 #2
Hi Banfa,
Indeed, DoS attack prevention would be much efficient if handled by firewalls and routers. However this does not devoid my attempt to do it server-side. One reason is : Are we sure if we deploy a custom server application and host it at some hosting provider, that this latter has mechanism in place to prevent DoS ?
I do'nt think so.

In term of solution, no it should not be so hard. To discern the legitemate one from the other 9, I can send a puzzle and expect the right solution in the incoming packet before accepting the connection at the application layer.
At the transport layer I can think of measuring the rate of incoming connection requests per incoming address : a DoS attack is most likely to come from one or handful places. Thus a local cache recording thing will do the job. Concerning the distributed attack, I am not concerned with since it is very rare case : for example the US gouvernment did it to shutdown Al Jazeera site on the occasion of a certain publication of a sensible matter.


I asked the question, because, from the one side I am trying to finalize a high-performant NIO framework in C++ and from the other side wondering if there other people who already analyzed/found DoS prevention code in open source appliaction servers like BlazeDS, etc..

Good day.
May 18 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

26
by: Michael Strorm | last post by:
Hi! I posted a message a while back asking for project suggestions, and decided to go with the idea of creating an adventure game (although it was never intended to be a 'proper' game, rather an...
4
by: leke | last post by:
I have been lurking here for a while and I have noticed some people writing about problems with their sites being hacked. As I am fairly new to this scene so I don't want to fall into vulnerable...
1
by: Doug | last post by:
Hi, I have a question on sql injection attacks. I am building a tool that will be used exclusively by our other developers and will generate stored procs for them dynamically based off input...
0
by: dunleav1 | last post by:
Does enabling/disabling Data Execution Prevention (DEP) have a performance impact on SQL 2000 or SQL 2005?
0
by: =?Utf-8?B?SGFyZHkgV2FuZw==?= | last post by:
Hi all, We know we can set up some propert firewall to do this job. But from application's side, what do you think we can do to prevent this type of attack? -- Regards Hardy
1
by: SingingDoughnut | last post by:
Can someone please help with some code? I have been making a game, but there is a problem with one scenario. When the playable character encounters an NPC and they fight, the game keeps going until...
6
by: K. | last post by:
Hello all! Can you write me some code which let me sleep calm during the night and what should I do to prevent some attackers from using curl function? In Poland there is a big portal which...
0
by: herpes prevention | last post by:
herpes prevention generic acyclovir herpes simplex disease
2
Frinavale
by: Frinavale | last post by:
SQL Injection Attack A database is a collection of information organised in such a way that allows computer programs to access data (even large amounts) quickly and easily. Data within a database is...
14
Frinavale
by: Frinavale | last post by:
I've been trying to test my web application using Internet Explorer 8 (release candidate 1) and have been experiencing some major problems. I'm hoping you can help me with this one. I have a...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.