LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-30-2015, 10:48 AM   #16
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694

That is a file permission. Programs need permissions depending on what they are trying to access while running. Ie: snort is trying to control the network interfaces,.
 
Old 09-30-2015, 11:29 AM   #17
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by iamgenius View Post
You are right! sudo does it. I'll just switch to root then. But why is this the case if file permissions for snort are rwxrwxrwx ?

Thanks
Don't switch to root, and continue to use sudo. Reason being is logged in as root you can inadvertently do stuff like remove files with a wildcard and thus remove critical system files. Yeah ... I know ... we all say "But I wouldn't do THAT!" Somewhere, there's a LQ thread about the latest stupid thing each of us has done.
Quote:
Originally Posted by szboardstretcher View Post
That is a file permission. Programs need permissions depending on what they are trying to access while running. Ie: snort is trying to control the network interfaces,.
Yes, this is the reason, to control the network interfaces you need to have root privileges, but you don't need to be root.
 
Old 09-30-2015, 12:13 PM   #18
iamgenius
LQ Newbie
 
Registered: Sep 2015
Posts: 19

Original Poster
Rep: Reputation: Disabled
Understood.

I appreciate all the help...Please bear with me a little more.
 
Old 10-01-2015, 12:54 PM   #19
iamgenius
LQ Newbie
 
Registered: Sep 2015
Posts: 19

Original Poster
Rep: Reputation: Disabled
Very quick and simple questions:

-Snort will have no effect whatsoever unless it is actually RUNNING actively on the target system (The system that is to be attacked). Right?

-Snort running with no rules at all will also have no effect also, right?

By effect I mean protecting the system or giving alerts

-From the looks of it, Snort has some standard rules that can be downloaded with it in addition to the rules that you can configure yourself. I presume standard rules or pre-configured snort or whatever they are called will give alerts/prevent against common pen tests or scanners like nmap for example; again right or wrong? I think using existing rules will be easier than configuring new ones for me and will save me some time since time is very limited.

I'll go try this:

http://insidetrust.blogspot.ae/2010/...k-4-basic.html

and something else and will probably come back with more questions.


Thanks again
 
Old 10-01-2015, 03:58 PM   #20
iamgenius
LQ Newbie
 
Registered: Sep 2015
Posts: 19

Original Poster
Rep: Reputation: Disabled
I'm not done yet with what I'm trying, but I came back with more questions.

In Snort website (and like explained before by), if you register you will have access to subscriber rules one month after they are created. You can download them by entering the wget command found in the website, but you need a code for that. I didn't get a code when I signed up. My account is active I think because I can successfully sign in. Where do you really get the code from?

For now, I downloaded the community rules but there is also a problem. When I try to use it I get the following error message:



What does that mean?
 
Old 10-02-2015, 08:13 AM   #21
iamgenius
LQ Newbie
 
Registered: Sep 2015
Posts: 19

Original Poster
Rep: Reputation: Disabled
I couldn't get community rules to work but at at least got something to work. I was able to get snort to give alerts about icmp packets. I recorded a video about it:

View My Video

I need to make a rule now that will prevent nmap/metasploit work.

Last edited by iamgenius; 10-02-2015 at 08:21 AM.
 
Old 10-03-2015, 01:59 AM   #22
iamgenius
LQ Newbie
 
Registered: Sep 2015
Posts: 19

Original Poster
Rep: Reputation: Disabled
Where is everybody? Please don't leave me alone on this, I need help. Should I move this to the linux security forum?

Okay, in addition to the icmp alert rule above, I was also able to get snort to reject icmp packets, give alerts when a certain website is visited, prevent access to this specific website. But I have some issues:

When I try to run snort as a Daemon, it fails and I get an error message:



I couldn't fix that.

Also, when I try to view the log files, they don't open correctly:




Anybody has an idea why is that happening? Note: I can see the website that I was preventing access to in the green circle, which means logging is working but I can't read the log file correctly.

Last edited by iamgenius; 10-03-2015 at 02:01 AM.
 
Old 10-03-2015, 11:43 AM   #23
iamgenius
LQ Newbie
 
Registered: Sep 2015
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by iamgenius View Post
Where is everybody? Please don't leave me alone on this, I need help. Should I move this to the linux security forum?

Okay, in addition to the icmp alert rule above, I was also able to get snort to reject icmp packets, give alerts when a certain website is visited, prevent access to this specific website. But I have some issues:

When I try to run snort as a Daemon, it fails and I get an error message:



I couldn't fix that.

Also, when I try to view the log files, they don't open correctly:




Anybody has an idea why is that happening? Note: I can see the website that I was preventing access to in the green circle, which means logging is working but I can't read the log file correctly.
I have been told that the special log files (One example shown above)are to be read only by something like wireshark.
 
Old 10-08-2015, 03:29 PM   #24
iamgenius
LQ Newbie
 
Registered: Sep 2015
Posts: 19

Original Poster
Rep: Reputation: Disabled
Hello again. It sounds like this thread has been left out. Anyways, I'm trying to fix my snort installation and make it perfect, so I started all over again. In one of the steps in page 6 of the 15 pages installation manual, it says that I need to place a shell script in the /etc/init.d directory. How do I place it in there? As a text file?

Any help is appreciated.

Last edited by iamgenius; 10-08-2015 at 03:31 PM.
 
Old 10-08-2015, 10:39 PM   #25
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
You should be doing that at the cli, in which case you just copy the script from wherever it is now to /etc/init.d .
(As it happens, shell scripts are just text ).
Don't forget to ensure it has the correct ownerships and permissions as well.
 
Old 10-09-2015, 03:12 AM   #26
iamgenius
LQ Newbie
 
Registered: Sep 2015
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by chrism01 View Post
You should be doing that at the cli, in which case you just copy the script from wherever it is now to /etc/init.d .
(As it happens, shell scripts are just text ).
Don't forget to ensure it has the correct ownerships and permissions as well.
Can you please clarify more?

I should go to /etc/init.d then create a new file by using touch command, open a text editor, put the script on it, save it and exit and leave the text file in the /etc/init.d directory ?


Thanks.
 
Old 10-12-2015, 12:07 AM   #27
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
That's one way if you don't already have the script written elsewhere.
NB: no need for 'touch'; the editor will create the file.

Read this
http://rute.2038bug.com/index.html.gz

PS: I strongly recommend writing it on the Linux box; don't use MSwin then copy it over or you'll have to use unix2dos to fix the line endings.
Just use vi / vim - you need to know this anyway.

Last edited by chrism01; 10-12-2015 at 12:09 AM.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help me come up with a mini linux security project idea iamgenius Linux - Newbie 6 09-16-2015 02:57 PM
LXer: Linux Mint Project Leader Shows the MintBox Mini and It's Incredibly Small LXer Syndicated Linux News 0 05-12-2015 07:45 PM
help in linux mini project needed. truelinux Programming 4 09-01-2005 08:46 AM
linux mini project avadhootak Linux - Software 1 11-26-2003 10:08 PM
linux mini project avadhootak Linux - General 5 11-25-2003 11:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration