Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Reply
 
LinkBack Thread Tools Display Modes
Old 17-12-2010, 10:56 PM   #1 (permalink)
Sin
 
Join Date: Dec 2007
Location: trivandrum,Kerala
Posts: 176
Exclamation 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 ?
__________________
»~$in~«
sinoop_joy is offline   Reply With Quote
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 19-12-2010, 01:02 PM   #2 (permalink)
XLr8
 
arpanmukherjee1's Avatar
 
Join Date: Sep 2008
Posts: 637
Default Re: Firewall : which language to use ?

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
__________________
Quote:
There are more things in heaven and earth, Horatio,
Than are dreamt of in your philosophy.
arpanmukherjee1 is offline   Reply With Quote
Old 20-12-2010, 12:00 AM   #3 (permalink)
Sin
 
Join Date: Dec 2007
Location: trivandrum,Kerala
Posts: 176
Default Re: Firewall : which language to use ?

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 ?
__________________
»~$in~«
sinoop_joy is offline   Reply With Quote
Old 20-12-2010, 10:23 PM   #4 (permalink)
XLr8
 
arpanmukherjee1's Avatar
 
Join Date: Sep 2008
Posts: 637
Default Re: Firewall : which language to use ?

elementary socket programming :: How to C# Socket programming

Quote:
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)

http://www.codeproject.com/KB/cs/Exe...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..
__________________
Quote:
There are more things in heaven and earth, Horatio,
Than are dreamt of in your philosophy.

Last edited by arpanmukherjee1; 20-12-2010 at 10:24 PM. Reason: Automerged Doublepost
arpanmukherjee1 is offline   Reply With Quote
Old 22-12-2010, 08:35 PM   #5 (permalink)
Sin
 
Join Date: Dec 2007
Location: trivandrum,Kerala
Posts: 176
Default Re: Firewall : which language to use ?

firewall application - C# says so
__________________
»~$in~«
sinoop_joy is offline   Reply With Quote
Old 23-12-2010, 06:34 PM   #6 (permalink)
XLr8
 
arpanmukherjee1's Avatar
 
Join Date: Sep 2008
Posts: 637
Default Re: Firewall : which language to use ?

^^^ 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
__________________
Quote:
There are more things in heaven and earth, Horatio,
Than are dreamt of in your philosophy.
arpanmukherjee1 is offline   Reply With Quote
Old 24-12-2010, 09:46 PM   #7 (permalink)
Sin
 
Join Date: Dec 2007
Location: trivandrum,Kerala
Posts: 176
Default Re: Firewall : which language to 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 ?
__________________
»~$in~«

Last edited by sinoop_joy; 25-12-2010 at 08:28 AM.
sinoop_joy is offline   Reply With Quote
Old 25-12-2010, 09:24 AM   #8 (permalink)
Right Off the Assembly Line
 
Join Date: Feb 2008
Posts: 26
Default Re: Firewall : which language to use ?

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?
Adam Cruge is offline   Reply With Quote
Old 25-12-2010, 10:34 AM   #9 (permalink)
XLr8
 
arpanmukherjee1's Avatar
 
Join Date: Sep 2008
Posts: 637
Default Re: Firewall : which language to use ?

Quote:
Originally Posted by sinoop_joy View Post
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

Quote:
Originally Posted by Adam Cruge View Post
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 : http://www.jrsoftware.org/isdl.php
__________________
Quote:
There are more things in heaven and earth, Horatio,
Than are dreamt of in your philosophy.

Last edited by arpanmukherjee1; 25-12-2010 at 10:44 AM.
arpanmukherjee1 is offline   Reply With Quote
Old 25-12-2010, 11:33 AM   #10 (permalink)
Right Off the Assembly Line
 
Join Date: Feb 2008
Posts: 26
Default Re: Firewall : which language to use ?

That is to do with software. Any other way to do it manually?
Adam Cruge is offline   Reply With Quote
Old 25-12-2010, 08:23 PM   #11 (permalink)
XLr8
 
arpanmukherjee1's Avatar
 
Join Date: Sep 2008
Posts: 637
Default Re: Firewall : which language to use ?

Quote:
Originally Posted by Adam Cruge View Post
That is to do with software. Any other way to do it manually?
of course u can...

but why not use something that is already out there and accepted as commercial standard ??
__________________
Quote:
There are more things in heaven and earth, Horatio,
Than are dreamt of in your philosophy.
arpanmukherjee1 is offline   Reply With Quote
Old 26-12-2010, 09:29 AM   #12 (permalink)
Right Off the Assembly Line
 
Join Date: Feb 2008
Posts: 26
Default Re: Firewall : which language to use ?

The reason behind is that I want to learn this from scratch. So if you please tell me the way to do it.
Adam Cruge is offline   Reply With Quote
Old 26-12-2010, 09:53 AM   #13 (permalink)
Sin
 
Join Date: Dec 2007
Location: trivandrum,Kerala
Posts: 176
Default Re: Firewall : which language to use ?

Quote:
Originally Posted by arpanmukherjee1 View Post
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 ?
__________________
»~$in~«
sinoop_joy is offline   Reply With Quote
Old 26-12-2010, 08:43 PM   #14 (permalink)
XLr8
 
arpanmukherjee1's Avatar
 
Join Date: Sep 2008
Posts: 637
Default Re: Firewall : which language to use ?

Quote:
Originally Posted by sinoop_joy View Post
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...

Quote:
Originally Posted by sinoop_joy View Post
BTW, how will VLAN b needed 4 my project ?.
it will be when u design a packet filter, which u will... eventually..

Quote:
Originally Posted by sinoop_joy View Post
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.

Quote:
Originally Posted by sinoop_joy View Post
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.

Quote:
Originally Posted by sinoop_joy View Post
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

Quote:
Originally Posted by sinoop_joy View Post
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

Quote:
Originally Posted by Adam Cruge View Post
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
__________________
Quote:
There are more things in heaven and earth, Horatio,
Than are dreamt of in your philosophy.

Last edited by arpanmukherjee1; 26-12-2010 at 08:55 PM. Reason: Automerged Doublepost
arpanmukherjee1 is offline   Reply With Quote
Old 19-02-2011, 11:02 AM   #15 (permalink)
Sin
 
Join Date: Dec 2007
Location: trivandrum,Kerala
Posts: 176
Default Re: Firewall : which language to use ?

Hey can you give me that code f your java project ?

How can i make my program start in kernel mode ?
__________________
»~$in~«
sinoop_joy is offline   Reply With Quote
Old 19-02-2011, 12:08 PM   #16 (permalink)
What The.... !!!
 
funkysourav's Avatar
 
Join Date: Jan 2009
Posts: 825
Default Re: Firewall : which language to use ?

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 is offline   Reply With Quote
Old 19-02-2011, 12:39 PM   #17 (permalink)
Sin
 
Join Date: Dec 2007
Location: trivandrum,Kerala
Posts: 176
Default Re: Firewall : which language to use ?

@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...
__________________
»~$in~«
sinoop_joy is offline   Reply With Quote
Old 19-02-2011, 01:00 PM   #18 (permalink)
What The.... !!!
 
funkysourav's Avatar
 
Join Date: Jan 2009
Posts: 825
Default Re: Firewall : which language to use ?

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
funkysourav is offline   Reply With Quote
Old 19-02-2011, 01:15 PM   #19 (permalink)
Sin
 
Join Date: Dec 2007
Location: trivandrum,Kerala
Posts: 176
Default Re: Firewall : which language to use ?

Quote:
Originally Posted by funkysourav View Post
join the forum
its not like they will be sharing Rocket Science Confidential secrets with you

__________________
»~$in~«
sinoop_joy is offline   Reply With Quote
Old 01-03-2011, 08:08 PM   #20 (permalink)
Sin
 
Join Date: Dec 2007
Location: trivandrum,Kerala
Posts: 176
Default Re: Firewall : which language to use ?

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.

__________________
»~$in~«

Last edited by sinoop_joy; 01-03-2011 at 08:19 PM.
sinoop_joy is offline   Reply With Quote
Old 01-03-2011, 10:21 PM   #21 (permalink)
What The.... !!!
 
funkysourav's Avatar
 
Join Date: Jan 2009
Posts: 825
Default Re: Firewall : which language to use ?

try running with admin privileges
maybe that will work
also lookup "iptables" the linux firewall
__________________
Re-spawning in 10 9 8 7 ......
ChimiChanga!!
funkysourav is offline   Reply With Quote
Old 02-03-2011, 08:15 PM   #22 (permalink)
Sin
 
Join Date: Dec 2007
Location: trivandrum,Kerala
Posts: 176
Default Re: Firewall : which language to use ?

Quote:
Originally Posted by funkysourav View Post
try running with admin privileges
maybe that will work
i already tried that..
Quote:
Originally Posted by sinoop_joy View Post
I tried running the exe as administrator. Bt then too it is not happening.


---------- Post added 02-03-2011 at 10:17 AM ---------- Previous post was 01-03-2011 at 10:56 PM ----------

where can i get the C# code of these ?

Using Windows Firewall with Advanced Security (Windows)

All are C++ or VB codes...


Can anyone convert this to C# code ?

Turning the Firewall Off (Windows)
__________________
»~$in~«
sinoop_joy is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Charan
- by Charan

Advertisement




All times are GMT +5.5. The time now is 03:24 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2