Firewall : which language to use ?

I would like to do Firewall(the one like COMODO) as my final year project.

The thing is i have read that it is not possible using C#. Is that so ?
I cant use Java too ?
How about Visual C++ ?

Any other suitable languages ?
 
all 3 langs have the ability to do so.

java and .net framework have classes that provide high level control

u must know the algos of networking and socket programing.

built a packet filter in java once
 
Can you provide me any details or a link to a sample program ?

I read that we need to program in kernel mode so we cannot use C# for that..
So you are saying that there is no problem with dat rite ?
What will these classes do to program ? Will they make the program execute in kernel mode ?
 
elementary socket programming :: How to C# Socket programming

we need to program in kernel mode so we cannot use C# for that.
now where did u read THAT ???

see :: C# does Shell, Part 1 - CodeProject

what i think u want to say is that u cannot access ring 0

more info on rings :: Ring (computer security) - Wikipedia, the free encyclopedia

that is also not correct

see:: ProcessStartInfo Class

Process Class (System.Diagnostics)

*www.codeproject.com/KB/cs/Execute_Command_in_CSharp.aspx

and yes u need to invoke the "net" dos command :: MS-DOS net command help

u may also be interested to look at Net Tools

i think now u realize the extent of .net and capability of C#

ask if u want to know more..
 
Last edited:
^^^ everything in that thread is correct.

you have to write unmanaged code in C# that is not governed by .net

u must take help of WinPcap and libPcap. the former a sniffer and latter a dropper
nobody expects u to write device drivers, just use them

one thing, if u seriously want to do such projects a LOT of research on ur part is required
 
I'm ready to do research. I actually want to do something like this to become better familiar with the language. But i'm doing this as part of my curriculum so i have to consider the mark part too. I will get approximately 3-4 months for doing this project.
Can you help me ?
 
Last edited:

Adam Cruge

Broken In
Nice post. I was wondering how to build such kind of software.
well one more doubt, after writing those code for that software how to transform it into .exe so that it looks like the software we use?
 
I'm ready to do research. I actually want to do something like this to become better familiar with the language. But i'm doing this as part of my curriculum so i have to consider the mark part too. I will get approximately 3-4 months for doing this project.
Can you help me ?

sure. i will post code fragments from my java project. u can convert it to C#

AFA u know what u r doing and can explain the algo be sure that u will be give above 90% marks

3-4 mths time is short, even if u know the lang. prefer doing it in the lang u know very well. if the lang is not known u will loose time coding functions that may already exist.

google up algos and look at the flow

i would highly recommend this book : Sybex CCNA Cisco Certified Network Associate Study Guide 2nd Edition 0782126472 download free

go through the index and find topics relevent to ur proj eg.
IP address resolution
VLAN
packet filter
packet structure etc

well one more doubt, after writing those code for that software how to transform it into .exe so that it looks like the software we use?

Visual Studio Professional edition supports Setup Projects that will create such setups.

also u can use Inno (free) at : *www.jrsoftware.org/isdl.php
 
Last edited:
sure. i will post code fragments from my java project. u can convert it to C#

i would highly recommend this book : Sybex CCNA Cisco Certified Network Associate Study Guide 2nd Edition 0782126472 download free

go through the index and find topics relevent to ur proj eg.
IP address resolution
VLAN
packet filter
packet structure etc

Thank u..
I'l be beginning soon.. Will let you know.
How can i contact you ?

BTW, how will VLAN b needed 4 my project ?
We had a Internetworking nd Computer networking theory n lab in the last semester. So i know the basics of networking.

And about the language, i did my mini project in c#. But it was a small one compared to this one. A sofware similar to Disclib. It was entirely different one.
I dont know the network monitoring part of any language,though i got the belief that i can catch up. And of course i got someone to help me now..:)

You did firewall in Java ?
 
Thank u..
I'l be beginning soon.. Will let you know.
How can i contact you ?

here on the forum itself. let others know of the progress and problem alike...

BTW, how will VLAN b needed 4 my project ?.

it will be when u design a packet filter, which u will... eventually..

We had a Internetworking nd Computer networking theory n lab in the last semester. So i know the basics of networking.

i know. i also know that programming structure provided by book is a big zero.

And about the language, i did my mini project in c#. But it was a small one compared to this one. A sofware similar to Disclib. It was entirely different one.

thats good. but learning never stops.

I dont know the network monitoring part of any language,though i got the belief that i can catch up. And of course i got someone to help me now..:)

there is always google to help u out and others and yes .. me

You did firewall in Java ?

no. i did "packet filtering" in java. firewall is a "configurable" packet filter and includes other algos/functions like heuristic search and support for encrytion like IPsec etc

The reason behind is that I want to learn this from scratch. So if you please tell me the way to do it.

no need 4 me tell u its done before

please read the articles in a sequential fashion ::

1> Writing A Good Setup For Your Applications - CodeProject
2> dotNetInstaller - Setup Bootstrapper for .NET Application - CodeProject
3> Enhanced .NET Bootstrap Setup - CodeProject

also Wix tutorial ::

4> Creating an installer using Wix v3.0, Votive, and Visual Studio 2005/2008 - CodeProject
5> Creating an installer using Wix v3.0, Votive, and Visual Studio 2005/2008 - Part 2, the GUI - CodeProject
 
Last edited:

funkysourav

What The.... !!!
hey i have got a wild idea
How about you join the Comodo Forums
there are a bunch of crazy but very helpful guys there
tell them that you are a student and ask them to help you
maybe you'll get lucky(someone might help you with the tricks of the trade)

else there are many open source firewall projects at source forge
SourceForge.net: Open Source Firewall For Windows - Develop
Express Open Source Firewall Project » Download
align yourself with one and learn with the help of other developers

BTW
Great project
all the best
 
@funkysourav :
Thanks 4 d links and suggestions.
I sent a mail 2 comodo team asking about the language they use. Bt no reply :-(
Nyway wil check the forum...
 

funkysourav

What The.... !!!
join the forum
and stay active there
you'll meet many helpful people there
heck even the COMODO CEO Melih sometimes talks and chats with end users on the forum
I think your best bet is there forum
don't ask for help not just yet
take your time, build reps and contacts
and present your problem as a hobby or student project
they will help you for sure

its not like they will be sharing Rocket Science Confidential secrets with you
but they will direct your path for sure
But it will take some time
 
Finally, i decided to modify the project a little bit.
I decided to do the controlling of Windows firewall to do the task. And started coding. Bt the problem is when i try to turn off the firewall using code , my program gets stopped and windows firewall is not turned off.. What could be the problem ?


I used this code...

Code:
Type NetFwMgrType = Type.GetTypeFromProgID("HNetCfg.FwMgr", false); 
INetFwMgr mgr = (INetFwMgr)Activator.CreateInstance(NetFwMgrType);
mgr.LocalPolicy.CurrentProfile.FirewallEnabled = false;



and i get this error.. I tried running the exe as administrator. Bt then too it is not happening.

*img535.imageshack.us/img535/561/capturewc.jpg
 
Last edited:
Top Bottom