Discussion Locked

The Amazing Boring Blog

0 helpful
142 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
blog root

142 replies

by jmgarvin

Not much to say here, other than I'm starting a blog here.

You'll probably see comments on Linux, Microsoft, Information Security, Hacking, and some basic rants and raves that seem to find their way into every blog.

If you are a teacher, I'm always interested in teaching tips and tricks...and content.

by jmgarvin

Currently, e-learning is a huge fad with institutions of education. Many places jump right into e-learning without much thought as to the overhead and problems associated with it. A huge part of the problem is that technology is seen as a panacea rather than a tool. Usually instructors and sys admins are thrown into the task of dealing with this new "panacea." A major part of the problem is the software.

I know, sacrilege! I dare say the software makers don't make user friendly UIs!!?? Yes. WebCT, Blackboard, Centra, and even Breeze are hard to use. Why? Because they use their own lingo, strange interfaces, and require the instructors/sys admin to know a specific language to actually use them. Sure they've all included WYSIWYG interfaces, but that isn't the point. The point is that they are HARD to use! Why is it so diffcult to design a decent UI? Do the engineers not even bother?

So I got tired of it and designed my own. EOTA and New Mexico Tech use it. While it isn't the end all be all, it is a step in the right direction. I'm tired of hard to use software, so I set out to design easy to use software. If you are curious check out my publications on it:
http://csdl.computer.org/comp/proceedings/itcc/2003/1916/00/19160043abs.htm
http://computing.breinestorm.net/technology+institute+department+nmt+edu/

Or check out my website
http://www.greenbranchcommunications.com/

What is the solution to bad interface design? I think everyone that is going to design software MUST read "The Design of Everyday Things" by Donald A. Norman. Norman is a genius and fully understand WHY interface design is bad and explains how to improve interface design.

Now, on to institutions that use e-learning as this magical panecea; STOP IT! E-Learning is just a tool. While it does help decentralize your classroom, it also costs money. Not only that but the 1-12 rule is in full effect with e-learning. That means for every 1 hour you spend for a meat world class, you must spend at least 12 hours for the same online class. Until you are established, it is quite a bit of work to get courses online and running. It is also harder to control the instructor at a distance. Many instructors take on the "hard ass" persona and cause the students many problems. The worst part of it is that many institutions see this as acceptable behavior and keep the instructor!! Training the instructor is key. Also keep in mind your instructors must be tech savvy or they will fail. The students also need an introduction to the LMS or online tool you are using. Make sure to have plenty of tutorials and keep in mind the lowest common denominator. A big thing that many institutions don't have is a 24/7 helpdesk. If your students can't get online or they have tech issues they can't resolve, they won't come back!

Oh, enough ranting and raving. I got out of that mess because I worked at an institution that didn't understand e-learning. They had the largest enrollment of online students in the state and they couldn't grasp what they had.

by dc_guy

The reason that all IT artifacts are so user-hostile is that they are designed by IT professionals. Even when they solicit requirements input from end users, it's all filtered through the consciousness (and the unconscious) of an IT person.

We're not like everybody else. We prefer working with technology to working with people. We like figuring out how things work. We enjoy being software mechanics. We (well, the rest of you anyway) don't like OS/X because it's like a contemporary auto with a sticker on the hood: Warning, No User-Serviceable Parts Inside.

The other six billion people on this planet aren't like that. They want their computers to be appliances that they can take for granted like their TVs and stoves. And have you noticed how user-hostile those two things have become lately since the design has become engineer-driven? Expect a consumer revolution back to chipless controls. Mark my words, as global prosperity increases and those other six billion people can afford computers, Apple will leave Grungeware in the dust.

Someone once summed this up perfectly: The way IT interfaces are built by programmers is the same way the roads in a housing tract would be laid out if the builder had done it. He would pave the bulldozer tracks because they "obviously" represent the traffic patterns.

by apotheon

I'm actually kinda curious about some aspects of the Green Branch software that isn't discussed on the website (as far as I've determined, at any rate). Specifically:

  1. Under what use licensing scheme(s) is it provided?
  2. What are the system and software requirements of the server-side?
  3. What are the system and software requirements of the client-side?

Depending on what the answers are to those questions, I may have more.

by jmgarvin

It has been my experience with incoming students that very few have been exposed to Linux either in their high school or college. My main question is why? It seems that MS has cornered the market on education as well as desktops! Why do teachers and insitutions spend millions on an untenable position? MS products are expensive. Why don't schools move to FREE Linux software?

With Linux and Unix taking about 50% of the server market share and about 2% of the desktop, it would make sense to teach it! The worst part is that too many teachers don't bother or don't care enough to even try! It isn't hard to get students excited about Linux!!! The OS is a little hard to get to know, but once you have used it, it grows on you; kind of like a fungus.

The thing that really gets me is the total lack of real world exposure these kids get. They are told that MS rules all and Linux is just for hacking. They are told that the only way they will ever get a job is if they get a MSCE or MSCA. While to some exent that is true (you really need to get SOME kind of certification to get a job), it is FUD. The FUD that is flying now is just off the wall. Open Source is insecure. Open Source means IP theft. Open Source is the devil. Steve Ballmer tried to FUD Linux out of existance, but failed. Why doesn't MS come to terms that its OS is problematic and not the best solution for servers and focus on making it the best desktop system the world has ever seen!?

by Member 29327465

It reminds me of my education in EE back in the early 90s. What languages did everyone have to learn? Fortran and Pascal. Even back then, there was general awareness that these languages were obsolete and C would have been a better choice.

My guess is that the reason the university hadn't moved was institutional inertia: they had tenured instructors and a whole infrastructure geared around teaching this course.

I wonder if switching to Linux might be the same deal..in that to provide linux training which coexists with Windows training you have to double your hardware and train a whole fleet of people to operate it. Maybe that's the impediment.

by Jay Garmon

It's also about effort. While I am but a lowly English major amongst techies, I had plenty of friends in my alma mater's Computer Science program. Less than a decade ago, every CompSci student learned two OS platforms, Windows 95, and UNIX (with a Novell Netware local network backbone).

Why UNIX? Because one of our physics professors did a lot of side work for NASA processing radio telescope data, and so he had a lot of UNIX tech donated to the school by the National Science Foundation as part of his grant (or so I was told by my CompSci buddies). UNIX was part of the curriculum because the school didn't have to spend any money acquiring the tech to teach it.

What has this got to do with Linux? Well, Microsoft goes out of its way to discount tech for academic institutions precisely because they know that college is where many students get their first exposure to personal computers, and because they know that colleges are strapped for cash. Linux developers don't offer anywhere near the same outreach programs. Even though the OS is free, nobody is out there doing the work for them, or convincing the school adminsitrators (the guys who sign the checks) to acquire Linux, even if the professors think it's worthwhile.

Setting aside Microsoft's market share dictating that it's software must be taught to aspiring computer professionals, Linux simply doesn't do the guerilla marketing necessary to get adopted by college CompSci programs. Maybe RedHat will catch on, or maybe Novell will start pushing this better, but there is a lot of catching up to do here.

by jmgarvin

IPtables and Webmin

I've given up teaching IPtables. What's that you say? "But how do you setup a Linux firewall without IPtables!?" Easy, I've simply migrated to Webmin.

Webmin is a great tool to learn how to setup IPtables without the overhead of teaching bash scripting! The nice thing is that Webmin is your all in one tool. You can setup sendmail, qmail, NFS, etc right there in a simple one stop shopping web interface.

The nicest thing is that the students learn far more about firewalls and statefulness using Webmin than they do struggling to make their bash script work! They tend to pick up on the issues of NEW, ESTABLISHED, and RELATED connections pretty quickly. Not only that, but it makes it easier for them to migrate to setup a Firebox.

Basic Linux Commands and a Basic IPtables setting

Ok, so you are looking for some basics on Linux and Linux security. Let us start with some simple commands.

  • ls -List everything in the current directory
  • ls -lah -List everything in the the current working directory including hidden files (a) in a long list (l) with human readable sizes (h)
  • pwd -Lists my current working directory
  • cd -Changes Directory to the given path. eg cd / takes me to the root directory.
  • du -h -Disk Usage in the current directory with human (h) readable sizes
  • df -h -Total Disk Usage (Disk Free) in human (h) reable format
  • pico || nano -This is a text editor you probably want to get. Pico comes with Pine and nano is a pico clone. I like nano, but whatver.
  • emacs& -Run Emacs in the background (keep the command line in your term)
  • less -show the contents of a file and allow scrolling
  • grep -search a file for a specified string.

Ok, so now we want to look at the contents of /etc/services. So less /etc/service. You can also grep smtp /etc/services. So you can see what service your port runs on. Another file we want to keep in mind is /etc/sysconfig/iptables. This contains our firewall information. To see what your current firewall config is: less /etc/sysconfig/iptables.

Now that we have a clue about our system and basic Linux commands. We need to move on to securing our box. Keep in mind in Linux always have a local interface (lo). Our network cards are typically named eth*. So network card 1 could be eth0 and network card 2 would be eth1. We also need to know some commonly used ports:

  • 21 FTP
  • 22 SSH
  • 25 SMTP
  • 53 DNS
  • 68 DHCP
  • 80 HTTP
  • 110 POP3
  • 143 IMAP
  • 161 SNMP (Intranet Only)
  • 443 HTTPS

On Monday, we'll start setting up our firewall and learning a little bit about bash scripting! We'll also download and install webmin so that we can easily configure our IPtables to fit our needs.

by apotheon

I notice you make reference to the /etc/sysconfig directory in this. Unfortunately, that directory is not a part of the Filesystem Hierarchy Standard, and as such is not a universally used convention in Linux filesystems. I rather suspect that you have been using a Red Hat derived Linux distribution for your dealings with iptables configuration, as I believe that the Red Hat family of Linux distros is the originator of that particular filesystem quirk. I know, at least, that the Fedora systems with which I deal in the Wikimedia datacenter have the /etc/sysconfig directory, and that my own Debian systems (Debian being a much more Linux Standard Base compliant distribution) do not.

It might be helpful, when composing online Linux howtos and tutorials, to make notes about what distribution you're using. This might save some confusion, as referring simply to Linux might leave some thinking that you're referring to Linux in the generic, or Linux Standard Base compliant distributions in particular. Just a thought.

In any case, I'll probably be following along with your tutorial stuff in this blog of yours. It looks like it'll be useful.

by root.operator

This may just be the tutorial ive been waiting for. I have set up
Webmin before and even tried to set up the IPTables stuff - but even
with a ton og google I still need help.

Ill be keeping tabs on your blog.

by jmgarvin

The Trivia Geek commented on a rant of mine about how schools don't teach Linux. I found what he said to be insightful and somewhat scary. What did he say that really bothered me?
What has this got to do with Linux? Well, Microsoft goes out of its way to discount tech for academic institutions precisely because they know that college is where many students get their first exposure to personal computers, and because they know that colleges are strapped for cash.
This really gets my back up. MS is marketing to the masses, but at the same time they are hurting the future of IT. How? These young CS, EE, IT kids are being short changed because MS wants to control the market. While I agree that business is business, it would be nice to see a Linux distro that could match the inroads that MS has made. Perhaps campus wide free support for a year or maybe a some on site training.

Linux developers don't offer anywhere near the same outreach programs. Even though the OS is free, nobody is out there doing the work for them, or convincing the school adminsitrators (the guys who sign the checks) to acquire Linux, even if the professors think it's worthwhile.
While I disagree with some points here, I do agree with the over all tone. Linux isn't selling itself! Linux DOES have people working for them, to get them into the corporate market! Linux DOES have outreach programs for the, yup you guessed it, corporate market! Red Hat did make some in roads at some colleges and some colleges (like New Mexico Tech) have been using Linux for quite some time. What I'd really like to see is more CS programs focus on the open source aspect of the Linux community and GENERATE an academic open source community of their own. It can just be a small community on campus, but it would be nice to see more colleges get invovled with the process.

I know some of you will bring up Dr. Victor Yodaiken from New Mexico Tech. Sure he did some things with RT Linux that had people up in arms, but really, was it so bad? Dr. Yodaiken did a lot to open academia up to using Linux and sharing code. He also showed that Linux and open source can be exploited for research that just can't happen with MS. I'm sure some of you will disagree, but the reality is that some academic institutions need to be pushed kicking and screaming into the 21st century. Will academia ever "get it?" Probably, but not before we have a generation of MS only techies!!

Setting aside Microsoft's market share dictating that it's software must be taught to aspiring computer professionals, Linux simply doesn't do the guerilla marketing necessary to get adopted by college CompSci programs. Maybe RedHat will catch on, or maybe Novell will start pushing this better, but there is a lot of catching up to do here.
Too true. I'd like to see on distro get down in the academic trenches and just push! MS is on the brink anyway. With all the issues with worms, trojans, XP SP2, etc, academia is tired of having to deal with it! Their system are mostly open (for good reason) and MS is causing problems at every school in the nation because of their constant security issues!! It would simply take a good salesman a few minutes with school administrators to make in roads with Linux.
My point? Get on the stick Linux distros! Make yourself know and let academia know that you hold about 50% of the market!! Let them know that MS is a security nightmare and you can help solve some of the problems. Explain WHY having specific user space is good.


Thanks Trivia Geek for bring up some great points and really helping me see why this is such an issue!

Oh, the Bash scripting and IPtables tutorial will be posted later today.

by apotheon

I'm just going to ignore that
previous comment by sfranzken. I'm not sure whether that was a joke or
a serious trolling incident.

In any case . . . It seems to me that there are two Linux distribution
vendors positioned to provide the sort of academic support to which you
refer: Red Hat and Novell/SuSE. Red Hat's current business plan roadmap
(for lack of a better term) doesn't seem to include this sort of
venture, but engaging the academic community and sponsoring adoption of
Linux-related (and Novell-centric) instruction seems to be exactly the
sort of thing Novell might be interested in doing soon. At this point,
I think it all depends on Novell's cash flow situation.

There are Linux solution vendors (as opposed to Linux distribution
vendors) who might also be well positioned to enter academia in that
manner, including perhaps IBM, Sun, and HP. To be fair, Sun is sort of
halfway between a distribution vendor and a solutions vendor, but I
placed Sun Microsystems here because of the very standoffish
relationship Sun has with Linux at the moment. As you might guess, I'm
not convinced that Sun is invested in Linux enough to want to promote
it through academic philanthropy. What Sun very well might start doing
though, depending on how this open source Solaris 10 deal goes, is
start pushing Solaris curricula in academia using Solaris 10 for x86.
As long as Sun doesn't close up the source for Solaris after v10, I'm
all for it, and I think it would benefit Sun's bottom line
significantly. Sun, on the other hand, has a long and proud history of
making ass-hatted business decisions that absolutely blow fantastic
opportunities and pour great gobs of money down the proverbial drain,
so Sun will probably let this one slip away entirely.

HP is a wet noodle, as far as Linux support is concerned. Unless the
new captain of the HP ship turns out to be a shot of dynamism for a
stultified old husk, I don't expect HP to get in on the academia action
as a Linux supporter. IBM, on the other hand, has the potential to be a
lot more helpful in that field. IBM has already invested a great deal
in the Linux mindshare with television ads (really good ones, actually)
and trade rag dominating print ads that actually focus on Linux as a
solution platform rather than on the IBM logo with a penguin playing in
the weeds nearby, as one might have expected. IBM has historically
remained aloof in matters like this sort of grubbing for attention in
academia, though, and I'm not sure it's terribly realistic to expect
that to turn around. IBM could really go either way without surprising
me, though I think the bulk of the likelihood sits on the "probably
not" side.

The best people for the job of getting Linux into schools would be
Linux services firms. I'm talking about companies that aren't hardware
vendors that use Linux and aren't Linux distribution vendors: they're
service and solution providers who sell service contracts and consult
for corporations. The canonical examples would be things like Progeny,
run by Ian Murdock, the originator of the Debian distribution.

Unfortunately for academia, these people are not at all likely to do
any of this for free. There'd have to be some third party actually
providing the philanthropy by way of paying a solution provider like
Progeny to be the needed experts.

Ultimately, I'd like to see the community for Slackware, or especially
Debian, step up to the challenge. The problem there is that these
communities are primarily a bunch of volunteers who aren't part of a
single formal business venture, and as such the entire financial aspect
and organizational influence is lacking. While Debian and Slackware are
each their own idiosyncratic distributions, they are also the two
oldest and the two least likely to be swayed by conflicts of interest
the way Red Hat would be (with the possible exception of Gentoo, which
is really not particularly suited to the role of academic Linux
exemplar). While I'm not sure of Slackware's adherence to the LSB, I
know that Debian's is quite creditable, and that too would serve as a
major indicator of suitability to the task.

There's just no way to pull it off, though, with the current state of
the community. Don't misunderstand: the Debian community may well be
the strongest noncommercial distribution-centric organization in
existence, but it doesn't have the structure and financial
characteristics needed to provide the sort of academic support at which
you've hinted here. Sad but true.

There are significant hurdles standing in the way of Linux advocacy to
match that of Microsoft in academia. Perhaps the best way to get the
ball rolling is to get your local LUG(s) to come to your local
college(s) and volunteer time toward getting some kind of Linux program
off the ground. If LUGs can link up with faculty members sympathetic to
the FLOSS community's "cause", perhaps something can be gotten moving.

At the very least, with a little effort and luck, monthly on-campus LUG
meetings might be arranged with some kind of nonfinancial sponsorship
from the college (perhaps donations of old computers that are being
phased out for the LUG's use, so long as they remain on-campus, if
you're lucky). The way to get into the halls of academia for Linux will
probably be by skulking in through the back door.

by jmgarvin

So, I would guess my few readers have noticed that I haven't posted the
promised blog entry on Monday (or any other day this week for that
matter). Life got a little crazy. There was a death in the
family and it is finals time at work, so I got hit with a double whammy.

I will continue with the tutorials soon, but it probably won't be until
late this week or next. I have been posting, but blogging is far
more consuming than a quick quip...so I hope you'll see some more on
setting up a firewall soon.

I also took the comments of apotheon to heart and will try to be more
generic or explain when I am distro specific. I tend towards the
RH flavor of distros, so sometimes I forget that they put things in
funny places.

by apotheon

Heh. "Funny places." Yeah, that's one of my major complaints about Fedora (with which I work almost exclusively in the datacenter). It was interesting trying to figure out how to do fine-grained configuration editing of NICs when I didn't know at first that Fedora hides network interface configuration files a couple levels deep in a scripts directory. I'm much more used to the Debian way of doing it, with network interface configuration being handled in the /etc/network/interfaces file. That was a bit of a wake-up call.

Red Hat and Fedora aren't all that LSB- and FHS-compliant, unfortunately, but they're still popular and ubiquitous enough that it behooves the professional Linux admin to know how they work. As such, I certainly don't have any problem with seeing your tutorials presented in terms of the Fedora Core distribution. You might even inspire me to post some (more Debian-centric, probably) tutorials in my own TRB. Maybe I'll even rework some of your Fedora-centric stuff to make it Debian-centric. Heh. Could be fun.

I'll probably end up too lazy to bother, though.

by jmgarvin

Part 1
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Ok, so I promised to work with IPtables and explain how bash scripting
works. I realized that is is a pretty big task, so I'm going to
start with the basics of IPtables at the command line and move on to
scripting and explain how that works. In Part 2 I will
start talking about using Webmin and making firewall rules in Webmin. In Part 3
I'll make the firewall stateful and you should be all locked down!

So lets start with the command line stuff we can do. First we
need to (F)lush our IPtables. These commands will flush the
iptables, the NAT, and the mangle table.

iptables -F


iptables -F -t nat


iptables -F -t mangle

-F is for Flush. -t specifies the table the operation
should work on. I don't need to specify the filter table with a
-t because it is the default table. If I did want to the syntax
would look like iptables -F -t filter. However, that is redudant,
so I didn't bother.

The basic structure of iptables (according to the man page) is iptables [-t table] command chain param_1 opt_1 param_n opt_n.
Let's brake this down. We invoke iptables via the iptables
command. We then choose the table. We only really need to
specify the nat or mangle table, but it might be good practice to use
filter. The command is what we are going to perform. The
parameters are the actions that may modify or clarify the
command.

Some common commands:

-A
Append the rule to the end of the chain specified

-D
Delete a rule

-I
Inserts a rule at a specified point

-L
Lists all the rules

-N
New chain is created

-P
Sets the policy to ACCEPT, DROP, or REJECT

Keep in mind the order of the rules is very important. So at the command line we enter our first two rules:

iptables -A INPUT -i lo -j ACCEPT


iptables -A OUTPUT -o lo -j ACCEPT

Let's check out those rules. First of all we are appending with a
-A both the INPUT and OUTPUT of the local host interface lo. We
are looking at the -i (input interface) and -o (output
interface). -j decides what will happen to the packet on the
system. In this case were are ACCEPTing the packet
unconditionally. We need this to make sure our local interface is
competely open and we don't lock the door too tightly!

What about packets comiing from the outside world?

iptables -A INPUT -i eth0 -p icmp -m icmp --icmp-type 0 -j ACCEPT

This is taking information for the INPUT interface with -p packet type of ICMP and -m
is matching it to the ICMP protocol. We then must define the ICMP
type to be of a certain flavor. In this case 0 means Echo
Reply. We then accept the ICMP packet type of echo reply.

If you are interested in the different ICMP packet types and codes check out iana.org.

The problem is that if we enter our IPtables at the command line we
have to enter them every time we reboot the computer! What a
pain!! How do we stop this mess? Well we move on to making
an iptables script. In the Red Hat flavor distros iptables live
at /etc/sysconfig/iptables. If you are using other distros
IPtables will probably live in /etc/rc.d/init.d/iptables or /etc/default/iptables.

So we need to whip out our favorite text editor (I like emacs and pico,
but I'm not here to start a vi vs emacs war) and open up our iptables
script. We can now modify it and have it start at boot time!

Ok, so what right? How should I do this? First of all you need to know a little about scripting. When you see $foo that is a variable that has been declared called foo. Your bash script comments look like "# this is a comment"
without the quotes. You also need to remember that your script
exectutes just as if you were typing on the command line! So away
we go.

#first let's declair where iptables lives. The actuall app should live here in almost all distros.
IPTBLS="/usr/sbin/iptables"

# Now let us set the default policy for our firewall.
# -P sets a default policy
$IPTBLS -P INPUT DROP
$IPTBLS -P FOWARD DROP
$IPTBLS -P OUTPUT ACCEPT

# We need to flush the tables.

$IPTBLS -F

$IPTBLS -F -t nat

$IPTBLS -F -t mangle

# Accept everything on the local interface
$IPTBLS -A INPUT -i lo -j ACCEPT

# Accept some incoming ports.
# We need port 80 for HTTP, port 443 for HTTPS and port 22 for SSH
# If you need to know what ports you need open check out iana.org
$IPTBLS -A INPUT -i eth0 -p tcp -dport 22 -j ACCEPT
$IPTBLS -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
$IPTBLS -A INPUT -i eth0 -p tcp -dport 443 -j ACCEPT

# My network uses DHCP, so I need to let that through
$IPTBLS -A INPUT -i eth0 -p tcp --sport 68 -j ACCEPT
$IPTBLS -A INPUT -t eth0 -p udp -sport 68 -j ACCEPT

That should complete your script. Keep in mind this is a VERY
simple firewall. In Part 2 I will get into Webmin from
installation to actually setting up your firewall.

by korkiley

You can also issue iptables commands on the command line.  Then when you're done /sbin/service iptables save will create a script for you in /etc/sysconfig/iptables.  At least this works for Red Hat Linux.  - Kor

by jmgarvin

Part 2
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
In this part I will
start talking about downloading, installing and using Webmin. This will
include making firewall rules in Webmin via the nice
GUI. Webmin also has a ton of other features that I will cover in
later blogs.

Before we start with the downloading Webmin, we should create a
directory for it. In the / directory make a directory called
webmin. To do this (if you are not root you must su (switch user) to root):
[boot@yoda /home/boot]# su
Password:
[root@yoda /home/boot]#
[root@yoda /home/boot]# cd /
[root@yoda /]# mkdir webmin
[root@yoda /]# cd webmin
[root@yoda /webmin]#


Now go to www.webmin.com
and click Downloading and Installing. Since I don't know if the
distro you are using supports RPMs, I will go through getting the
tar.gz file (or by clicking this link).
Choose a mirror. If you are in the US it is best to choose a
mirror in the US, but you can pick any site. Now, choose the
directory that webmin will download to (the webmin directory right off
the root (/) directory). Once the file has downloaded we
must untar and unzip the file. We need to keep the permissions
that are set as well. To do this, make sure you are in the proper
directory (the one you downloaded webmin to and do the following:

[root@yoda /webmin]# ls -la

total 7688
drwxr-xr-x 2 root root 4096 May 31 18:21 .
drwxr-xr-x 31 root root 4096 May 31 18:21 ..
-rw-r--r-- 1 root root 7835665 May 31 18:20 webmin-1.200.tar.gz
[root@yoda /webmin]# tar -zxpf webmin-1.200.tar.gz
[root@yoda /webmin]# cd webmin-1.200
[root@yoda /webmin/webmin-1.200]#

The command tar -zxpf is broken down like this. z =
ungZip the file, x = eXtract the files and directories from the tar
ball, p = keep the Permissions on the files and directories, and f =
the tar File we are extracting from.

Webmin has an easy setup. We simply need to run a script that
will install everything for us! The scripts name in
setup.sh. To run this script we must use the ./ command (which
basically means we want to execute that command). So we need to
do this:
[root@yoda /webmin/webmin-1.200]# ./setup.sh

Now Webmin will start the setup process. I will go though the process and my comments will be in all CAPS and BOLD
***********************************************************************
*
Welcome to the Webmin setup script, version
1.200 *

***********************************************************************
Webmin is a web-based interface that allows Unix-like operating
systems and common Unix services to be easily administered.

Installing Webmin in /webmin/webmin-1.200 ...

***********************************************************************
Webmin uses separate directories for configuration files and log files.
Unless you want to run multiple versions of Webmin at the same time
you can just accept the defaults.

I WOULD INSTALL WEBMIN IN THE DEFAULT DIRECTORY WHICH IS /ETC/WEBMIN

Config file directory [/etc/webmin]:
MOST LOGS LIVE IN /VAR, SO YOU SHOULD PROBABLY KEEP THIS CONVENTION UNLESS YOU KEEP YOUR LOGS ELSEWHERE

Log file directory [/var/webmin]:

***********************************************************************
Webmin is written entirely in Perl. Please enter the full path to the
Perl 5 interpreter on your system.

PERL NORMALLY LIVES HERE
Full path to perl (default /usr/bin/perl):
Testing Perl ...
Perl seems to be installed ok

WEBMIN WILL NOW TELL YOU YOUR OS AND VERSION. WITH
SOME VERSIONS OF LINUX THIS GETS WONKIFIED, BUT NO WORRIES, YOU WILL BE
FINE EVEN IF THIS IS INCORRECT

***********************************************************************
Operating system name: Redhat Linux
Operating system version: Fedora 3

***********************************************************************
Webmin uses its own password protected web server to provide access
to the administration programs. The setup script needs to know :
- What port to run the web server on. There must not be another
web server already using this port.
- The login name required to access the web server.
- The password required to access the web server.
- If the webserver should use SSL (if your system supports it).
- Whether to start webmin at boot time.

UNLESS YOU HAVE A BURNING REASON NOT TO, USE SSL. PORT 10000 IS ALSO GOOD AS NOT MUCH ON YOUR INTRANET SHOULD RUN ON IT.
Web server port (default 10000):

YOU SHOULD PROBABLY CHANGE THE DEFAULT LOGIN NAME FOR BASIC SECURITY.
Login name (default admin):
CHOOSE A GOOD STRONG PASSWORD AS WEBMIN IS BROWSER ACCESSABLE!
Login password:
Password again:
I WAS LAZY AND DIDN'T INSTALL SSLEARY LIBARY. YOU SHOULD IF YOU WANT A MODICUM OF SECURITY
The Perl SSLeay library is not installed. SSL not available.
UNLESS THERE IS SOME REASON WEBMIN SHOULDN'T START AT BOOT TIME, MAKE SURE YOU CHOOSE Y
Start Webmin at boot time (y/n):
Creating web server config files..
..done

Creating access control file..
..done

Inserting path to perl into scripts..
..done

Creating start and stop scripts..
..done

Copying config files..
..done

Configuring Webmin to start at boot time..
Created init script /etc/rc.d/init.d/webmin
..done

Creating uninstall script /etc/webmin/uninstall.sh ..
..done

Changing ownership and permissions ..
..done

Running postinstall scripts ..
..done

Attempting to start Webmin mini web server..
Starting Webmin server in /webmin/webmin-1.200
..done

***********************************************************************
Webmin has been installed and started successfully. Use your web
browser to go to

http://localhost.localdomain:10000/

and login with the name and password you entered previously.

[root@yoda /webmin/webmin-1.200]#

Now Webmin is installed! We can now go to the webpage by simply
opening your favorite browser (I suggest Firefox 1.0.3) and type in
127.0.0.1:10000. This will bring us to the Webmin login page.

Type in the username and password you created when you installed Webmin
and click login. You will now see the Webmin main menu. At
the top of the page you will see some icons. Choose Networking
(4th tab). Now choose Linux Firewall. This is a way to
configure IPtables graphically. If you don't have a firewall
pre-configured Webmin will ask you if it should configure a default
policy for you. Choose the policy that allows SSH and IDENT.

You will notice you have some rules (if you allowed Webmin to setup a
policy). If you don't have rules, the first rule you should
configure is for lo. The first rule should be:
ACCEPT if the Input Interface is lo
OR
ACCEPT if the Input Interface is not eth0

How do I do this? Click Add Rule under Incoming
Packets. Give the rule a comment that it is accepting all
traffic on lo. The action to take is ACCEPT. The Incoming
Interface equals lo. Click Save.
OR
How do I do this? Click Add Rule under Incoming Packets. Give the
rule a comment that it is accepting all traffic on lo. The action to
take is ACCEPT. The Incoming Interface not equal to eth0. Click Save.

You have just created your first rule! Now that isn't very
hard. Let's create a rule to allow people http (port 80) access
to my box. I simply need to make a rule that says:
ACCEPT If protocol is TCP and destination port is 80

How do I do this? Click Add Rule under Incoming Packets.
Give the rule a comment that this is for http incoming
traffic. The action to take is ACCEPT. The Network
Protocol equals TCP. The Destination TCP or UDP port equals
80. Click Save.

Now we want to drop all other packets that come at us. So change your Default Action to DROP.

Now click Apply Configuration.  Your firewall is now
running!  It is working and blocking all incoming connections
except on 22 and 80.

As an exersise you should match the ruleset we developed in Part 1
through Webmin. This shouldn't be too hard you just need to add
port 68 (UDP and TCP) and port 443 (TCP).

You now have a mostly working firewall! If you ever scew up your
firewall you can simple edit (or erase) the script in your favorite
text editor. The script should live in /etc/sysconfig/iptables in
RH variants or in typical Linux in /etc/rc.d/init.d/iptables.

Coming soon, Part 3. We'll finish up and talk about what
really needs to be locked down and why. We'll also go into some
stateful configs that you may find useful. Please post any
questions or comments so that this tutorial can be more useful.

by jmgarvin

Part 3
---------------------------------------------------------------------------------------------------------
So now we are going to start locking down our system and making our
firewall stateful. What does that mean? We need to make our rules
stronger so we keep out the bad guys. I'm assuming that your
intranet is somewhat secured and that your firewall rules will focus
only on ingress traffic. Keep in mind that I'm not covering NAT
or packet mangling at this time.

So, we need to lock down our system from various ingress traffic. What
do we need to do? First of all, we need to figure out what
ports need to be open. I assume you will need SSH, DNS, HTTP,
HTTPS traffic. You also need to have Echo Request and Echo Reply
available. If you need to open more ports, you will have an
idea of how to do it now.

Lets start talking about statefulness. This will help quite a bit
in making our firewall more secure. However, a stateful firewall
does require more resources, so make sure you take that into account
when you are setting up your firewall and acquiring the hardware that
you need.

A stateful firewall via IPtables can have the states of NEW,
ESTABLISHED, RELATED, or INVALID. NEW denotes a new connection to
your firewall that was not requested by you. An ESTABLISHED
connection is something that was started on your end. A RELATED
connection is any connection that is a relative of an ESTABLISHED
connection. An INVALID connection is not part of any
connection.

So how do we make our firewall stateful? The easiest way to to
create a blanket ESTABLISHED statement. In Webmin choose Add Rule
for INCOMING.
Choose ACCEPT for the Action
Connection State Equals ESTABLISHED

This will only accept connections to your firewall created by your
end. However, if we are running a web server this doesn't allow
people to view our pages because they are creating a NEW
connection.

So how do I make certain rules stateful? I don't create the blanket
stateful rules.  I apply a stateful rule to each of my existing
rules.  Let's start with Echo
Reply, because it is a good rule to make stateful. Why? Because I want
to make sure that I am reply to a request I made. This will help
squash attacks like TFN2K.
Click on your Echo Reply rule
Connection State equals ESTABLISHED
Click Save

We have just created a rule to only echo reply to echo requests we have made.

We also need to make sure our DNS queries are accepted.
Click Add Rule
Click ACCEPT for Action
Network Protocol Equals UDP
Source Port Equals 53

You can also make this stateful, but I will leave this as an exersise to the reader.

We also need to look at packet burst and flow rate. We can limit
how fast we get traffic and this can hinder DoS and DDoS attacks.
You will probably have to play around, but a good place to start is 5.

This ends my tutorial on setting up a firewall in Linux. While
this firewall is not meant to be amazingly secure, it is meant to get
the reader started down the path of creating a secure firewall. Below
you will see that I've posted my simple IPtables rules for you to
copy and build off of. In coming blogs I will talk about Squid,
SquidGuard, qmail, hacking tools, and probably Bastille Linux. If
you have any questions please post in
the comments.


# My IPtables Rules


# Generated by iptables-save v1.2.11 on Fri May 27 17:45:41 2005


*nat


:PREROUTING ACCEPT [4:779]


:POSTROUTING ACCEPT [3:1234]


:OUTPUT ACCEPT [3:1234]


COMMIT


# Completed on Fri May 27 17:45:41 2005


# Generated by iptables-save v1.2.11 on Fri May 27 17:45:41 2005


*mangle


:PREROUTING ACCEPT [88:12376]


:INPUT ACCEPT [87:12096]


:FORWARD ACCEPT [0:0]


:OUTPUT ACCEPT [85:11637]


:POSTROUTING ACCEPT [85:11637]


COMMIT


# Completed on Fri May 27 17:45:41 2005


# Generated by iptables-save v1.2.11 on Fri May 27 17:45:41 2005


*filter


:FORWARD ACCEPT [0:0]


:INPUT DROP [0:0]


:OUTPUT ACCEPT [0:0]


# Accept traffic from internal interfaces


-A INPUT ! -i eth0 -j ACCEPT


# Accept traffic with the ACK flag set


-A INPUT -p tcp -m tcp --tcp-flags ACK ACK -j ACCEPT


# Allow data that is related to existing connections


-A INPUT -m state --state RELATED -j ACCEPT


# Accept responses to DNS queries


-A INPUT -p udp -m udp --sport 53 -j ACCEPT


# Accept responses to our pings


-A INPUT -p icmp -m icmp -m state --icmp-type echo-reply --state ESTABLISHED -j ACCEPT


# Accept notifications of unreachable hosts


-A INPUT -p icmp -m icmp --icmp-type destination-unreachable -j ACCEPT


# Accept notifications to reduce sending speed


-A INPUT -p icmp -m icmp --icmp-type source-quench -j ACCEPT


# Accept notifications of lost packets


-A INPUT -p icmp -m icmp --icmp-type time-exceeded -j ACCEPT


# Allow connections to our SSH server


-A INPUT -p tcp -m tcp --dport ssh -j ACCEPT


# Allow connections to our IDENT server


-A INPUT -p tcp -m tcp --dport auth -j ACCEPT


# Allow connections to our HTTP server


-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT


# Allow connections to our HTTPS server


-A INPUT -p tcp -m tcp -m state -i eth0 --dport 443 --state NEW,ESTABLISHED,RELATED


-j ACCEPT


# Allow incoming DHCP


-A INPUT -p tcp -m tcp -i eth0 --dport 68 -j ACCEPT


# Allow incoming DHCP


-A INPUT -p udp -m udp -i eth0 --dport 68 -j ACCEPT


COMMIT

by jmgarvin

So, I can't decide what tutorials to put up first.  I'd like a hint or two a what people want to see and I'll put it up.

I was thinking of Samba, Squid, SquidGuard, qmail, SELinux setup, more
Webmin (using all the features), Snort, Tripwire, Nessus, nmap,
Bastille Linux, and maybe something on various root kits and how to get
rid of them.

I'm also working on a publication on SMTP that I might post some previews to. 

Any suggestions on what you want would be apprecieted, otherwise I'm going to go full speed ahead with what I want to do ;-)

by apotheon

For my own preferences, I'd like to see snort, nmap, and nessus in here. I'm somewhat functional, but learned uses for each by trial and error and only as I needed them. As such, I'm sure I could learn something from your own knowledge on the subject of network security auditing with such tools. In another direction, Squid functionality, both for local proxy security and for site performance proxy service, would be of interest to me.

. . . but you seem to be doing fine on your own. I'll just read what you post, most likely.

by jmgarvin

So, tomorrow you will see a pretty good development of nmap on the
command line. While nmap has a nice front end, I prefer the
CLI. I feel like I have more control over what nmap is doing and
how it is doing it.

Before you move on to my tutorial tomorrow, you might ask, what is
nmap, does it run on my OS, and where do I get it? nmap is a port
scanner. This means is looks for ports that respond on your
computer (either open, filtered, or closed). What nmap does for
us is lets us know if we have any ports open that don't need to be or
if ports that are for the intranet are visiable to the outside
world. This plays into a firewall that is setup well.

nmap will run on Linux, Unix, OSX, and Windows. You will probably
have to get the libraries for it to run. You will need
*nix
libpcap
PCRE perl-compatible
regular expression library
Windows
winpcap

You can pickup nmap at insecure.org. You will need either:
*nix files:
source nmap 3.81 bz2
Redhat Package Manager nmap 3.81 rpm
Windows files:
nmap 3.81 zip

So, download the packages and try to install them. I'll start with installation and move on to usage tomorrow.

If you have problems in Windows XP SP2 check here for a work around: SP2 Work Around.

See you tomorrow!

by jmgarvin

I assume you have installed nmap. I am also assuming you are using Linux.

If you haven't installed nmap via the tar.bz2 or the rpm simply follow these directions:
tar.bz2 || tgz file
If you have the tar.bz2 at the command line
[root@yoda nmap-3.81]# tar -jxpf nmap-3.81.tar.bz
If you have the tgz at the command line
[root@yoda nmap-3.81]# tar -zxpf nmap-3.81.tgz

Now change directory into nmap-3.81.
[root@yoda nmap-3.81]# cd nmap-3.81
[root@yoda nmap-3.81]# ./configure && make && make install

If you went the rpm route you can either get it from the site:

[root@yoda nmap-3.81]# rpm -vhU http://download.insecure.org/nmap/dist/nmap-3.81-1.i386.rpm

Or you can install the package via the rpm you downloaded
[root@yoda nmap-3.81]# rpm -vi nmap-3.81-1.i386.rpm

Now that the package is installed we can run nmap! Make sure you are root so you can use all the options nmap as to offer.

Let us get started. At the command line:
[root@yoda nmap-3.81]# nmap
Nmap 3.81 Usage: nmap [Scan Type(s)] [Options]
Some Common Scan Types ('*' options require root privileges)
* -sS TCP SYN stealth port scan (default if privileged (root))
-sT TCP connect() port scan (default for unprivileged users)
* -sU UDP port scan
-sP ping scan (Find any reachable machines)
* -sF,-sX,-sN Stealth FIN, Xmas, or Null scan (experts only)
-sV Version scan probes open ports determining service & app names/versions
-sR RPC scan (use with other scan types)
Some Common Options (none are required, most can be combined):
* -O Use TCP/IP fingerprinting to guess remote operating system
-p ports to scan. Example range: 1-1024,1080,6666,31337
-F Only scans ports listed in nmap-services
-v Verbose. Its use is recommended. Use twice for greater effect.
-P0 Don't ping hosts (needed to scan www.microsoft.com and others)
* -Ddecoy_host1,decoy2[,...] Hide scan using many decoys
-6 scans via IPv6 rather than IPv4
-T General timing policy
-n/-R Never do DNS resolution/Always resolve [default: sometimes resolve]
-oN/-oX/-oG Output normal/XML/grepable scan logs to
-iL Get targets from file; Use '-' for stdin
* -S /-e Specify source address or network interface
--interactive Go into interactive mode (then press h for help)
Example: nmap -v -sS -O www.my.com 192.168.0.0/16 '192.88-90.*.*'
SEE THE MAN PAGE FOR MANY MORE OPTIONS, DESCRIPTIONS, AND EXAMPLES

I'm going to focus on the commonly used scans and other options.

-sS: A syn stealth scan. What does this mean? It means we
send the first part of a TCP handshake, but nothing more.
Normally there are three steps to a TCP handshake. Node A sends a
SYN packet to Node B. Node B then acknowledges this with a
SYN/ACK packet. Node A then will send an ACK. So what does
this do for us? It lets us know where we might be able to connect
to (what ports are open).

-sU:
A UDP scan. This lets us know what UDP ports are open for us
to connect to. Keep in mind that UDP is a connectionless protocol
it isn't as elegant as TCP (which is connection oriented).

-sV:
this gives us the version of the application running on the
port. This is useful to see if there are any bugs or exploits for
that particular version.

-O:
The letter O. It gives us a guess at the OS that is
running. It is usually pretty good about guessing the fingerprint
(from the protocol stack), but it is sometimes a little off on the
guess.

-v:
Verbose! We want to use this...we actually want to use three
of these. Why? So we can get the most information
possible...

-P0:
That is PZERO. This will not ping the host and will speed up
our scans. Pinging a host is usually pointless, so it is best to
enable this option.

-oN:
Writes to a file the scan you are doing. This will let you analyze your scans later.

So, enough explanation, let's get to scanning! I like to scan
www.hackthissite.org (IP of 70.85.54.212) because they don't
mind! It is a good way for us to get similar information and for
you to see how nmap works.
[root@yoda nmap-3.81]# nmap -sS -sV -O -P0 -vvv -oN foo.txt 70.85.54.212
This is a SYN stealth scan that will discover the application
version and the OS. It will not ping the target and we are going
to get a very very verbose output. This will be logged to a file
called foo.txt. The target is 70.85.54.212
(hackthissite.org). Go grab a cup of coffee or fire up Neverwinter Nights, this takes a little time (about 5 minutes).

So your output from nmap should look
something like this:
Starting nmap 3.81 ( http://www.insecure.org/nmap/ ) at 2005-06-07 08:25 MDT
Initiating SYN Stealth Scan against jupiter.hackthissite.org (70.85.54.212) [1663 ports] at 08:25
Discovered open port 22/tcp on 70.85.54.212
Discovered open port 25/tcp on 70.85.54.212
Discovered open port 21/tcp on 70.85.54.212
Discovered open port 80/tcp on 70.85.54.212
Bam! We have some open ports!

Increasing send delay for 70.85.54.212 from 0 to 5 due to max_successful_tryno increase to 4
Increasing send delay for 70.85.54.212 from 5 to 10 due to max_successful_tryno increase to 5
Increasing send delay for 70.85.54.212 from 10 to 20 due to max_successful_tryno increase to 6
Increasing send delay for 70.85.54.212 from 20 to 40 due to max_successful_tryno increase to 7
Increasing send delay for 70.85.54.212 from 40 to 80 due to 11 out of 11 dropped probes since last increase.
Increasing send delay for 70.85.54.212 from 80 to 160 due to max_successful_tryno increase to 8
SYN Stealth Scan Timing: About 3.75% done; ETC: 08:38 (0:12:54 remaining)
Increasing send delay for 70.85.54.212 from 160 to 320 due to 11 out of 12 dropped probes since last increase.
Increasing send delay for 70.85.54.212 from 320 to 640 due to 11 out of 12 dropped probes since last increase.
SYN Stealth Scan Timing: About 69.34% done; ETC: 08:44 (0:05:55 remaining)
The SYN Stealth Scan took 1169.70s to scan 1663 total ports.
Well that was a waste of time! We looked for more open ports, but there weren't any!!!

Initiating service scan against 4 services on jupiter.hackthissite.org (70.85.54.212) at 08:44
The service scan took 5.20s to scan 4 services on 1 host.
What services and verison are running?

For OSScan assuming port 21 is open, 20 is closed, and neither are firewalled
This is interesting, but probably nothing...but we might want to pack this away for later...

Host jupiter.hackthissite.org (70.85.54.212) appears to be up ... good.
Interesting ports on jupiter.hackthissite.org (70.85.54.212):
(The 1650 ports scanned but not shown below are in state: filtered)
Filter ports usually mean they are one way (ingress or egress)

PORT STATE SERVICE VERSION

20/tcp closed ftp-data
21/tcp open ftp vsFTPd 1.2.1
22/tcp open ssh OpenSSH 3.6.1p2 (protocol 2.0)
23/tcp closed telnet
25/tcp open smtp Postfix smtpd
53/tcp closed domain
80/tcp open
http Apache httpd 2.0.52 ((Unix)
mod_ssl/2.0.52 OpenSSL/0.9.7e DAV/2 PHP/5.0.3 SVN/1.1.3)

110/tcp closed pop3
389/tcp closed ldap
443/tcp closed https
5000/tcp closed UPnP
6346/tcp closed gnutella
8080/tcp closed http-proxy
Oh, looky here...We have some closed ports, but we can see
what is probably running on them! A port may be closed, but at
least is responded! There might still be some information to be
gained there!!!

Device type: general purpose
Running: Linux 2.4.X
OS details: Linux 2.4.20 (Red Hat)
OS Fingerprint:
TSeq(Class=RI%gcd=1%SI=36F13E%IPID=Z%TS=100HZ)
T1(Resp=Y%DF=Y%W=5B4%ACK=S++%Flags=AS%Ops=MNNTNW)
T2(Resp=N)
T3(Resp=N)
T4(Resp=Y%DF=Y%W=0%ACK=O%Flags=R%Ops=)
T5(Resp=Y%DF=Y%W=0%ACK=S++%Flags=AR%Ops=)
T6(Resp=Y%DF=Y%W=0%ACK=O%Flags=R%Ops=)
T7(Resp=N)
PU(Resp=N)
It looks like they are running Red Hat 9 with the 2.4.20
kernel. This is probably true, but the finger print needs to be
verified.

Uptime 89.111 days (since Thu Mar 10 05:05:20 2005)
TCP Sequence Prediction: Class=random positive increments
Difficulty=3600702 (Good luck!)
TCP ISN Seq. Numbers: A9683F55 A980DA16 A99DEA4E A96F6F6A AA1C9260 A9C958F4
IPID Sequence Generation: All zeros
This will be a tough nut to crack according to nmap.
While I tend to agree, there are some fun things that may be
available! Since they are running Red Hat 9 with the 2.4.20
kernel, we can probably take advantage of some of the security holes
they might not have patched!!!

Nmap finished: 1 IP address (1 host up) scanned in 1177.099 seconds

Raw packets sent: 2038 (81.8KB) | Rcvd: 1676 (93.6KB)

Let's take a look at the important parts. Well, first of all we
found 22,25,21,and 80 open. We then kind of farted around looking
for more open ports. Normally you would limit your port scan to
the "typical" ports, but in this example I thought it best to go
through the whole spiel. Even closed ports can give us some
information, and they may not really be closed, just not so much open.

So you have installed and used nmap. In the next tutorial I will
explain Stealth FIN, Xmas, and Null scan. I will also explain why the
RPC scan can give us a little more information.  I'll also explain
why some of the information is so useful (or potentially useful). 

Keep in mind this is so that you can secure your network and not harm
others.  With information I'm giving you, you will be caught and
put into FPMITAP. You need to know a lot more about Red Teaming and quiet entry before you won't get caught.

Now you have the nmap basics! Make sure to post any questions
or comments so that I may address any holes in this short tutorial.

by jmgarvin

In
this tutorial I will
explain Stealth FIN, Xmas, and Null scans. I will also explain why the
RPC scan can give us a little more information. I'll also explain
why some of the information is so useful (or potentially useful).
Keep in mind that these scans can be detected, so don't go around
scanning your whole neighborhood!

Let's examine the Stealth FIN, Xmas, and Null
scans. These three scans can help us gather more
information about a target or possibly what kind of traffic the target
may allow through.

Stealth FIN Scan - The FIN scan is
probably the most interesting becasue the FIN packet is sent without
having gone through the normal TCP handshake! So, we don't
actually have a session, but we are trying to close one.
That is why this is a "stealth" scan. We aren't actually creating
a connection, so we don't leave much of a trace. This can lead to
some interesting results because the target will send back a RST packet
if the port is closed. If the port is open we get back
nothing.

Xmas Tree Scan - In this scan the PUSH,
URG, and FIN flags are set. The reasoning behind it being called
a christmas tree is that alternating bits turned on and off in the
flags. So we get a 00101001 pattern. It kind of looks like
the lights of a christmas tree...sorta...Anyway, a RST packet is sent
back if the port is closed, and nothing is returned if it is open.

Null Scan - All the flags of the TCP packet are turned off.
This shouldn't ever happen in the real world, so you might be a little
noisy if the admin is on the lookout. If the port is closed
we get a RST, if it is open we get nothing back.

These scans are very handy because at most only two packets are
used! Typically because the scans are so quiet, they won't show
up as connections in a log and a stateful firewall might not notice
them. The only problem is that with a Windows based system you
might get back that all the ports are closed, even when they are
open!!! I guess this could be useful in locating Windows servers,
but in reality it means the scans aren't very usefull against Windows
boxes.

So lets look at our SYN stealth port scan.

PORT STATE SERVICE VERSION
20/tcp closed ftp-data
21/tcp open ftp vsFTPd 1.2.1
22/tcp open ssh OpenSSH 3.6.1p2 (protocol 2.0)
23/tcp closed telnet
25/tcp open smtp Postfix smtpd
53/tcp closed domain
80/tcp open
http Apache httpd 2.0.52 ((Unix)
mod_ssl/2.0.52 OpenSSL/0.9.7e DAV/2 PHP/5.0.3 SVN/1.1.3)

110/tcp closed pop3
389/tcp closed ldap
443/tcp closed https
5000/tcp closed UPnP
6346/tcp closed gnutella
8080/tcp closed http-proxy

Device type: general purpose
Running: Linux 2.4.X
OS details: Linux 2.4.20 (Red Hat)
OS Fingerprint:
TSeq(Class=RI%gcd=1%SI=36F13E%IPID=Z%TS=100HZ)
T1(Resp=Y%DF=Y%W=5B4%ACK=S++%Flags=AS%Ops=MNNTNW)
T2(Resp=N)
T3(Resp=N)
T4(Resp=Y%DF=Y%W=0%ACK=O%Flags=R%Ops=)
T5(Resp=Y%DF=Y%W=0%ACK=S++%Flags=AR%Ops=)
T6(Resp=Y%DF=Y%W=0%ACK=O%Flags=R%Ops=)
T7(Resp=N)
PU(Resp=N)

Ok, looks good. What happens with a FIN, Xmas, and Null scan? Let's see

FIN
[root@yoda /]# nmap -sF -sV -O -P0 -vvv 70.85.54.212
Starting nmap 3.81 ( http://www.insecure.org/nmap/ ) at 2005-06-08 07:20 MDT
Initiating FIN Scan against jupiter.hackthissite.org (70.85.54.212) [1663 ports] at 07:20
Increasing send delay for 70.85.54.212 from 0 to 5 due to 11 out of 13 dropped probes since last increase.
Increasing send delay for 70.85.54.212 from 5 to 10 due to 11 out of 11 dropped probes since last increase.
Increasing send delay for 70.85.54.212 from 10 to 20 due to 11 out of 11 dropped probes since last increase.
Increasing send delay for 70.85.54.212 from 20 to 40 due to 11 out of 11 dropped probes since last increase.
FIN Scan Timing: About 7.34% done; ETC: 07:26 (0:06:19 remaining)
Increasing send delay for 70.85.54.212 from 40 to 80 due to 11 out of 11 dropped probes since last increase.
Increasing send delay for 70.85.54.212 from 80 to 160 due to 11 out of 11 dropped probes since last increase.
Increasing send delay for 70.85.54.212 from 160 to 320 due to max_successful_tryno increase to 4
Increasing send delay for 70.85.54.212 from 320 to 640 due to max_successful_tryno increase to 5
FIN Scan Timing: About 38.48% done; ETC: 07:37 (0:10:54 remaining)
FIN Scan Timing: About 96.50% done; ETC: 07:38 (0:00:38 remaining)
The FIN Scan took 1136.57s to scan 1663 total ports.
Initiating service scan against 15 services on jupiter.hackthissite.org (70.85.54.212) at 07:38
Discovered open port 22/tcp on 70.85.54.212
Discovered open port 25/tcp on 70.85.54.212
Discovered open port 21/tcp on 70.85.54.212
Discovered open port 80/tcp on 70.85.54.212
The service scan took 5.20s to scan 15 services on 1 host.
Warning: OS detection will be MUCH less reliable because we did not find at least 1 open and 1 closed TCP port
For OSScan assuming port 21 is open, 44111 is closed, and neither are firewalled
Insufficient responses for TCP sequencing (0), OS detection may be less accurate
Host jupiter.hackthissite.org (70.85.54.212) appears to be up ... good.
Interesting ports on jupiter.hackthissite.org (70.85.54.212):
(The 1648 ports scanned but not shown below are in state: filtered)
PORT
STATE
SERVICE VERSION

20/tcp open|filtered ftp-data
21/tcp
open
ftp
vsFTPd 1.2.1

22/tcp
open
ssh
OpenSSH 3.6.1p2 (protocol 2.0)

23/tcp open|filtered telnet
25/tcp
open
smtp
Postfix smtpd

53/tcp open|filtered domain
80/tcp
open
http Apache
httpd 2.0.52 ((Unix) mod_ssl/2.0.52 OpenSSL/0.9.7e DAV/2 PHP/5.0.3
SVN/1.1.3)

110/tcp open|filtered pop3
389/tcp open|filtered ldap
443/tcp open|filtered https
580/tcp open|filtered sntp-heartbeat
1001/tcp open|filtered unknown
4987/tcp open|filtered maybeveritas
5000/tcp open|filtered UPnP
8080/tcp open|filtered http-proxy
Device type: general purpose
Running: Linux 2.4.X
OS details: Linux 2.4.20 (Red Hat)
OS Fingerprint:
T1(Resp=Y%DF=Y%W=5B4%ACK=S++%Flags=AS%Ops=MNNTNW)
T2(Resp=N)
T3(Resp=N)
T4(Resp=Y%DF=Y%W=0%ACK=O%Flags=R%Ops=)
T5(Resp=N)
T6(Resp=N)
T7(Resp=N)
PU(Resp=N)

Nmap finished: 1 IP address (1 host up) scanned in 1145.182 seconds

Raw packets sent: 2154 (86.5KB) | Rcvd: 1659 (92.9KB)

So I didn't get much more information than I did with the SYN stealth scan. Let's keep going and see what happens.

Xmas
[root@yoda /]# nmap -sX -sV -O -P0 -vvv 70.85.54.212

Starting nmap 3.81 ( http://www.insecure.org/nmap/ ) at 2005-06-08 07:41 MDT
Initiating XMAS Scan against jupiter.hackthissite.org (70.85.54.212) [1663 ports] at 07:41
Increasing send delay for 70.85.54.212 from 0 to 5 due to 11 out of 13 dropped probes since last increase.
Increasing send delay for 70.85.54.212 from 5 to 10 due to 11 out of 11 dropped probes since last increase.
Increasing send delay for 70.85.54.212 from 10 to 20 due to 11 out of 11 dropped probes since last increase.
Increasing send delay for 70.85.54.212 from 20 to 40 due to 11 out of 11 dropped probes since last increase.
XMAS Scan Timing: About 7.35% done; ETC: 07:47 (0:06:18 remaining)
Increasing send delay for 70.85.54.212 from 40 to 80 due to 11 out of 11 dropped probes since last increase.
Increasing send delay for 70.85.54.212 from 80 to 160 due to 11 out of 11 dropped probes since last increase.
Increasing send delay for 70.85.54.212 from 160 to 320 due to max_successful_tryno increase to 4
Increasing send delay for 70.85.54.212 from 320 to 640 due to max_successful_tryno increase to 5
Increasing send delay for 70.85.54.212 from 640 to 1000 due to max_successful_tryno increase to 6
XMAS Scan Timing: About 33.65% done; ETC: 08:01 (0:13:31 remaining)
XMAS Scan Timing: About 65.90% done; ETC: 08:12 (0:10:34 remaining)
The XMAS Scan took 1938.66s to scan 1663 total ports.
Initiating service scan against 13 services on jupiter.hackthissite.org (70.85.54.212) at 08:13
Discovered open port 22/tcp on 70.85.54.212
Discovered open port 25/tcp on 70.85.54.212
Discovered open port 21/tcp on 70.85.54.212
Discovered open port 80/tcp on 70.85.54.212
The service scan took 77.85s to scan 13 services on 1 host.
Warning: OS detection will be MUCH less reliable because we did not find at least 1 open and 1 closed TCP port
For OSScan assuming port 21 is open, 36717 is closed, and neither are firewalled
Insufficient responses for TCP sequencing (2), OS detection may be less accurate
For OSScan assuming port 21 is open, 34882 is closed, and neither are firewalled
Insufficient responses for TCP sequencing (2), OS detection may be less accurate
For OSScan assuming port 21 is open, 32964 is closed, and neither are firewalled
Insufficient responses for TCP sequencing (2), OS detection may be less accurate
Host jupiter.hackthissite.org (70.85.54.212) appears to be up ... good.
Interesting ports on jupiter.hackthissite.org (70.85.54.212):
(The 1650 ports scanned but not shown below are in state: filtered)
PORT STATE SERVICE VERSION
20/tcp open|filtered ftp-data
21/tcp
open
ftp vsFTPd 1.2.1
22/tcp
open
ssh OpenSSH 3.6.1p2 (protocol
2.0)
23/tcp open|filtered telnet
25/tcp
open
smtp Postfix smtpd
53/tcp open|filtered domain
80/tcp open http?
110/tcp open|filtered pop3
389/tcp open|filtered ldap
443/tcp open|filtered https
3005/tcp open|filtered deslogin
5000/tcp open|filtered UPnP
8080/tcp open|filtered http-proxy
1 service unrecognized despite returning data. If you know the
service/version, please submit the following fingerprint at
http://www.insecure.org/cgi-bin/servicefp-submit.cgi :
SF-Port80-TCP:V=3.81%D=6/8%Time=42A6FD0F%P=i686-pc-linux-gnu%r(HTTPOptions
SF:,FC,"HTTP/1\.1\x20200\x20OK\r\nDate:\x20Wed,\x2008\x20Jun\x202005\x2020
SF::03:06\x20GMT\r\nServer:\x20Apache/2\.0\.52\x20\(Unix\)\x20mod_ssl/2\.0
SF:\.52\x20OpenSSL/0\.9\.7e\x20DAV/2\x20PHP/5\.0\.3\x20SVN/1\.1\.3\r\nAllo
SF:w:\x20GET,HEAD,POST,OPTIONS,TRACE\r\nContent-Length:\x200\r\nConnection
SF::\x20close\r\nContent-Type:\x20httpd/unix-directory\r\n\r\n")%r(RTSPReq
SF:uest,FC,"HTTP/1\.1\x20200\x20OK\r\nDate:\x20Wed,\x2008\x20Jun\x202005\x
SF:2020:03:11\x20GMT\r\nServer:\x20Apache/2\.0\.52\x20\(Unix\)\x20mod_ssl/
SF:2\.0\.52\x20OpenSSL/0\.9\.7e\x20DAV/2\x20PHP/5\.0\.3\x20SVN/1\.1\.3\r\n
SF:Allow:\x20GET,HEAD,POST,OPTIONS,TRACE\r\nContent-Length:\x200\r\nConnec
SF:tion:\x20close\r\nContent-Type:\x20httpd/unix-directory\r\n\r\n")%r(Hel
SF:p,15E,"
SF:N\">\n\n\
SF:n\n

\n

HELP\x20to\x2
SF:0/\x20not\x20supported\.
\n

\n


\n

Apache/2\.0\.52
SF:\x20\(Unix\)\x20mod_ssl/2\.0\.52\x20OpenSSL/0\.9\.7e\x20DAV/2\x20PHP/5\
SF:.0\.3\x20SVN/1\.1\.3\x20Server\x20at\x20jupiter\.hackthissite\.org\x20P
SF:ort\x2080

\n\n")%r(SSLSessionReq,15C,"
SF:x20HTML\x20PUBLIC\x20\"-//IETF//DTD\x20HTML\x202\.0//EN\">\n
SF:>\n\n\n<
SF:h1>Method\x20Not\x20Implemented\n

\x16\x03\x20to\x20/\x20not\x20
SF:supported\.
\n

\n


\n

Apache/2\.0\.52\x20\(Unix\)\
SF:x20mod_ssl/2\.0\.52\x20OpenSSL/0\.9\.7e\x20DAV/2\x20PHP/5\.0\.3\x20SVN/
SF:1\.1\.3\x20Server\x20at\x20jupiter\.hackthissite\.org\x20Port\x2080
SF:dress>\n\n")%r(LPDString,162,"
SF:\x20\"-//IETF//DTD\x20HTML\x202\.0//EN\">\n\n\n\n

\n

\x01default\x20to\x20/\x20not\x20supported\.

SF:\x20/>\n

\n


\n

Apache/2\.0\.52\x20\(Unix\)\x20mod_ssl/2\.
SF:0\.52\x20OpenSSL/0\.9\.7e\x20DAV/2\x20PHP/5\.0\.3\x20SVN/1\.1\.3\x20Ser
SF:ver\x20at\x20jupiter\.hackthissite\.org\x20Port\x2080

\n
SF:>\n");
Hmmm..This is a little interesting...Let's pack this away and look at it later...

Too many fingerprints match this host to give specific OS details
TCP/IP fingerprint:
SInfo(V=3.81%P=i686-pc-linux-gnu%D=6/8%Tm=42A6FD62%O=21%C=-1)
T1(Resp=N)
T2(Resp=N)
T3(Resp=N)
T4(Resp=N)
T5(Resp=N)
T6(Resp=N)
T7(Resp=N)
PU(Resp=N)
Uptime 90.090 days (since Thu Mar 10 05:05:29 2005)

Nmap finished: 1 IP address (1 host up) scanned in 2033.130 seconds

Raw packets sent: 2537 (103KB) | Rcvd: 1675 (93.8KB)
Once again I have the same basic information, but I did
get a little more. I do know now that it is an i686 and I might
be able to find out some stuff with that HTML code.


Null
[root@yoda /]# nmap -sN -sV -O -P0 -vvv 70.85.54.212
Starting nmap 3.81 ( http://www.insecure.org/nmap/ ) at 2005-06-08 08:22 MDT
Initiating NULL Scan against jupiter.hackthissite.org (70.85.54.212) [1663 ports] at 08:22
Increasing send delay for 70.85.54.212 from 0 to 5 due to 11 out of 14 dropped probes since last increase.
Increasing send delay for 70.85.54.212 from 5 to 10 due to max_successful_tryno increase to 4
Increasing send delay for 70.85.54.212 from 10 to 20 due to max_successful_tryno increase to 5
Increasing send delay for 70.85.54.212 from 20 to 40 due to 11 out of 12 dropped probes since last increase.
Increasing send delay for 70.85.54.212 from 40 to 80 due to 11 out of 11 dropped probes since last increase.
NULL Scan Timing: About 4.69% done; ETC: 08:32 (0:10:10 remaining)
Increasing send delay for 70.85.54.212 from 80 to 160 due to 11 out of 11 dropped probes since last increase.
Increasing send delay for 70.85.54.212 from 160 to 320 due to 11 out of 11 dropped probes since last increase.
Increasing send delay for 70.85.54.212 from 320 to 640 due to 11 out of 11 dropped probes since last increase.
Increasing send delay for 70.85.54.212 from 640 to 1000 due to max_successful_tryno increase to 6
NULL Scan Timing: About 49.05% done; ETC: 08:43 (0:11:05 remaining)
NULL Scan Timing: About 85.58% done; ETC: 08:47 (0:03:40 remaining)
The NULL Scan took 1603.30s to scan 1663 total ports.
Initiating service scan against 22 services on jupiter.hackthissite.org (70.85.54.212) at 08:48
Discovered open port 22/tcp on 70.85.54.212
Discovered open port 80/tcp on 70.85.54.212
Discovered open port 25/tcp on 70.85.54.212
Discovered open port 21/tcp on 70.85.54.212
The service scan took 10.23s to scan 22 services on 1 host.
For OSScan assuming port 21 is open, 20 is closed, and neither are firewalled
Host jupiter.hackthissite.org (70.85.54.212) appears to be up ... good.
Interesting ports on jupiter.hackthissite.org (70.85.54.212):
(The 1632 ports scanned but not shown below are in state: filtered)
PORT
STATE
SERVICE VERSION

20/tcp closed ftp-data
21/tcp
open
ftp
vsFTPd 1.2.1

22/tcp
open
ssh
OpenSSH 3.6.1p2 (protocol 2.0)

23/tcp closed telnet
25/tcp
open
smtp
Postfix smtpd

53/tcp closed domain
80/tcp
open
http
Apache httpd 2.0.52 ((Unix) mod_ssl/2.0.52 OpenSSL/0.9.7e DAV/2
PHP/5.0.3 SVN/1.1.3)

110/tcp closed pop3
119/tcp open|filtered nntp
194/tcp open|filtered irc
389/tcp closed ldap
419/tcp open|filtered ariel1
422/tcp open|filtered ariel3
443/tcp closed https
563/tcp open|filtered snews
666/tcp open|filtered doom
797/tcp open|filtered unknown
900/tcp open|filtered unknown
994/tcp open|filtered ircs
1214/tcp open|filtered fasttrack
1516/tcp open|filtered vpad
1533/tcp open|filtered virtual-places
3531/tcp open|filtered peerenabler
5000/tcp closed UPnP
5050/tcp open|filtered mmcc
5999/tcp open|filtered ncd-conf
6346/tcp closed gnutella
6699/tcp open|filtered napster
8080/tcp closed http-proxy
8081/tcp open|filtered blackice-icecap
8082/tcp open|filtered blackice-alerts
Device type: general purpose
Running: Linux 2.4.X
OS details: Linux 2.4.20 (Red Hat)
OS Fingerprint:
TSeq(Class=RI%gcd=1%SI=499A09%IPID=Z%TS=100HZ)
T1(Resp=Y%DF=Y%W=5B4%ACK=S++%Flags=AS%Ops=MNNTNW)
T2(Resp=N)
T3(Resp=N)
T4(Resp=Y%DF=Y%W=0%ACK=O%Flags=R%Ops=)
T5(Resp=Y%DF=Y%W=0%ACK=S++%Flags=AR%Ops=)
T6(Resp=Y%DF=Y%W=0%ACK=O%Flags=R%Ops=)
T7(Resp=N)
PU(Resp=N)

Uptime 90.113 days (since Thu Mar 10 05:05:30 2005)
TCP Sequence Prediction: Class=random positive increments

Difficulty=4823561 (Good luck!)

TCP ISN Seq. Numbers: F566A154 F638C52E F60C85DC F59BEC7D F635841C F6302009
IPID Sequence Generation: All zeros

Nmap finished: 1 IP address (1 host up) scanned in 1615.840 seconds

Raw packets sent: 2162 (86.8KB) | Rcvd: 1677 (93.6KB)

Ok this is interesting. I see a ton of
open ports on a Null scan! However, I'll bet money most of these
ports are mis-reporting or are out there to sucker me in...Until we
know more it is best to be careful.

So what does all this mean? Well, now we
know a little more about the system and what kind of information we can
gather from it. We also know that we have a little more
information than we would have if we just did a SYN scan.
We have a good idea of what is really running on the system and what
ports may allow us entry into the box. In general, it looks like
this box is pretty well secured, but we really need to poke a little
more to make sure.

I'll leave the RPC scan as an exersise for the
reader, but I will explain what a RPC does for us. We should
probably polish this scan party of with an RPC scan just make see if
they are trying to hide any RPC based applications on a wonky
port. Sure it is a long shot, but it might reveal that one
insecurity that could lead to critical failure.

So let's take a look at the ports that may help
us. Keep in mind filtered usually means that traffic is only one
way (ingress or egress, but not both). So we know that port 21, 22, 25, and 80 are open. It looks like 23, 53, 110, 389, and 8080 are filtered.
Since we know what versions of software they are running on their ports
we may be able to take advantage of a bug. We might also be able
to relay mail off port 25 if they configured postfix poorly. If
they allow anon logons via FTP, we might be able to get a shell.
If we monitor 23 we might get some information like a username and
password because everything in telnet is sent in the plain. 53 is
probably a dead end, but we might be able to DNS spoof. 110 might
give us usernames and passwords if they don't encrypt. 389 is a
similar situation, but any admin worth their salt doesn't let LDAP
information slip out onto the internet. 8080 is a proxy (or
probably is) so that means we might be able to take advantage or a
poorly configured proxy.

Many vectors, but none of them are very
clean. Tomorrow we will talk a bit more about how we find out
even more about this box and how to get in.

by jmgarvin

So, now we have some basic information on hackthissite.org.  I
think what I'll do now is run a Nessus scan on it.  First you have
to install Nessus.  Go to www.nessus.org
and click download.  Choose to download the Unix installer. 
You might need to get some extra stuff to make Nessus run.  At
most you will need the nessus-libraries-2.2.4.tar.gz and
libnasl-2.2.4.tar.gz.  To keep up to date, get the plugins for
Nessus as well.

After you have downloaded the installer it is a simple matter to install Nessus, simply run the script. So the command will be:
[root@yoda /root]# ./nessus-installer-2.2.4.sh

This will run the install script.  Now we need to configure Nessus
a little so we can get it to run.  First we need to make a cert:
[root@yoda /nessus]# nessus-mkcert

Next we need to add a user:
[root@yoda /nessus]# nessus-adduser

Now we can start the daemon:
[root@yoda /nessus]# nessusd -D

Now we can fire up our client and log in with the username and password we created!
[root@yoda /nessus]# nessus &

You need to log in with the username and password that you created in
the Nessusd hosts tab.  After that click on the target tab. 
Let's scan hackthissite.org and see what we find.   Enter the
IP 70.85.54.212 in the target(s) box.

We are now ready to scan this target.  Click the Start the Scan
button.  When your scan completes, you can check out exactly what
is going on on the target in the Nessus "NG" Report. 

If you click on the subnet and then on the host we can narrow down the
machines we are looking at.  In this case, we only see one
machine, but sometimes we will have a larger scope of a scan than that.

In the report you'll notice that the target is running a version of SSH
older than 3.7.1.  Not only that, but it tells you how to fix
it! 

You'll also notice on port 25 it made an attempt at banner grabbing, but it doesn't do much for us.

On port 80 we get some good news:
The directories /cgi-bin, /icons, /manual, and /stats are enumerated
for us!  What a boon!  While normally this isn't a big deal,
we can now start digging deeper on the website to see what else we can
find.

The nice thing about Nessus is it will also traceroute for us!  Take a look:
10.60.108.148 (me)
10.60.110.1 (intranet router)
***.***.***.*** (ISP with the IP hidden to protect the innocent)
64.213.176.150 (resolves to: the-planet.ge-0-2-1.ar1.dal2.gblx.net)
70.85.127.30 (resolves to: dist-vlan31.dsr3-2.dllstx3.theplanet.com)
70.85.127.76 (resolves to: dist-vlan22.dsr1-2.dllstx2.theplanet.com)
12.96.160.4 (resolves to: po-1.car11-1.dllstx2.theplanet.com)
70.85.54.212 (resolves to: jupiter.hackthissite.org)

So, we have a bunch of information about this handy dandy target. 
We even were able to grab a few banners.  Now, we need to go back
to the drawing board and look over the data we have.

Tomorrow, I'll analyze the data from the Nessus scan and we'll go
though it step by step to see what we have and what is vulnerable.

by jmgarvin

So, Monday I should probably have an analysis of what all this means (nmap and nessus data)...

While I chug along, is there anything that I need to clarify or explain further?

by jmgarvin

Let's take a more in depth look at what we have.  Remember we ran nmap and nessus on hackthissite.org.  These two tools are used to gather information and decide what security vulnerabilities and attack vectors are available.  From a sys admin perspective we can see EXACTLY what any attacker would see and this can lead us to a stronger and more secured box.

First, let's revist our SYN stealth port scan.

PORT STATE SERVICE VERSION
20/tcp closed ftp-data
21/tcp open ftp vsFTPd 1.2.1
22/tcp open ssh OpenSSH 3.6.1p2 (protocol 2.0)
23/tcp closed telnet
25/tcp open smtp Postfix smtpd
53/tcp closed domain
80/tcp open http Apache httpd 2.0.52 ((Unix) mod_ssl/2.0.52 OpenSSL/0.9.7e DAV/2 PHP/5.0.3 SVN/1.1.3)
110/tcp closed pop3
389/tcp closed ldap
443/tcp closed https
5000/tcp closed UPnP
6346/tcp closed gnutella
8080/tcp closed http-proxy

Remember, these were what interested us at first.  So we did find out some good information.  They are running:

1) vsFTPd 1.2.1
2) OpenSSH 3.6.1p2
3) sendmail with postfix.  The banner doesn't tell us what version they are running, even if we manually try it...
4) Apache 2.0.52 with OpenSSL 0.9.7e, PHP 5.0.3, and SVN 1.1.3

The rest seem to be closed to us, so we will ignore them for now.

With Nessus we noticed in the report the target is running a version of SSH older than 3.7.1, which could be an issue.  You'll also notice on port 25 it couldn't find out the version either. On port 80 we get some good news.
The directories /cgi-bin, /icons, /manual, and /stats are enumerated for us.  While normally this isn't a big deal, we can now start (manually) digging deeper on the website to see what else we can find.

Ok, so what, right?  Well lets check at securityfocus.com and see what kinds of bugs we can pick up with the version we have.  I'll leave that as an exersise to the reader, but there are some interesting finds out there on the web.

The fun part is playing around trying to poke our way into the directory structure.  So what do we do now?  I think I'll leave that to my readers.  What do you think is a good first step?  What should we do?  How do we get into the directories that Nessus found for us? 

Drop in some feedback and we'll discuss the findings...(ok this is a ploy to get a discussion going, but it should be interesting)

by jmgarvin

My next tutorial will be on Bastille Linux.  I'll have this up either today or tomorrow.

by jmgarvin

So, I was planning on putting up more stuff in my blog last week and I
didn't.  I was also planning on putting more stuff in my blog this
week, and I'm drowning in work. 

I hope to have something up on Bastille by the end of the week, but we shall see...

by stress junkie

Thanks for the excellent information about Nessus and using it to check for network vulnerabilities. I really appreciate the amount of work that you put into your articles.

by jmgarvin

Thanks Stress Junkie...I needed to hear that after this week ;-)

I'm wondering where my time has gone lately. I know part of it is
being eaten by a game called "Fate." It is a Diablo clone that is
quite good. Sure it is put out by Wild Tangent, but they tell you
how to disable their software.

I am also working hard to get my students moving this quarter.
For some reason the summer quarter always seems to have the most drama.

by jmgarvin

jdclyde posted a great link in a discussion that had gone slightly off
track. The discussion was a problem because the question was so
open and vague that many of the local geeks jumped on the OP for
posting a question that he should be able to look up.

Why did this happen? Let me point you to the posters question:
https://www.techrepublic.com.com/wireless-thread
Let me point you to jdclyde's link:
http://www.catb.org/~esr/faqs/smart-questions.html

On that note, Bastille Linux will have a starter tutorial on Friday! 

by apotheon

I've been hurling that link at people for years, now. Mostly, they don't listen. It doesn't stop me from trying.

by jmgarvin

Fate the Game
Ok, let me start off by saying, if you like Diablo and you are looking for a fix I highly suggest Fate the Game.
Sure it has some Wild Tangent software, but you can remove the reg keys
pretty easily or just block it with your firewall.

Bastille Linux Install and Some Setup
So, on to Bastille Linux. Bastille Linux is a way to secure your
system via a nice clear PerlTK GUI or a clean text interface via Perl
Curses. I think it is called Perl Curses because the CPAN version
seems to NOT INSTALL. Maybe this is a FC3 problem, but it sure was
frustrating. I had to dig around for the rpm. So, I got the
RPM for both PerlTK and Perl Curses. I found out later that on
the Bastille site there is a handy table with all the info you need
(and links!). The rpm table can be fournd here
http://www.bastille-linux.org/perl-rpm-chart.html. If you are using Debian, you can get everything at http://packages.debian.org/stable/admin/bastille.
Keep in mind that I'm a Red Hat kinda guy, so I'm going to focus on
that install. Plus, the debian install should be pretty easy
anyway.

If you choose to use CPAN to get your Perl packages, that is fine, but
I'm not going to cover that. Like I mentioned before you may
experience problems with FC3 and Curses from CPAN. TK worked
fine. I really can't explain what happened or why...it might even
be meat error (although I NEVER make errors!).

Ok to install Bastille download the Bastille RPM. Make sure to
get the PerlTK and Perl Curses RPMs while you are at it too. You
don't have to install both, but I did just because I was thinking about
using Curses for a UI later on. If you plan on using the GUI get
TK. If you plan on using the "CLI" get Curses.

So simply install the Perl rpms via rpm -vih perl-.rpm
Install Bastille in a similar manner rpm-vih Bastille-.rpm

For your debian folks you can use apt or the link I posted earlier in the blog.

Now Bastille is installed!

Ok, now what? Simply type bastille -x (GUI) or bastille -c (text).

I tend to use the GUI because I like to maximize the Window so I can read everything very easily.

Click OK to get past the title screen. Now, this is kind of a
personal setup, but generally, if you read what is going on you should
be ok. I'm going to hit on the some of the harder points and
explain what is going on.

The very first question (posted at the very top of the GUI) is "Would
you like to set more restrictive permissions on the administration
utilities?"
You should answer YES to this. This will help
lock down typical things like ifconfig and fsk so that a user cannot
access them.


"Should Bastille ensure the telnet service does not run on this
system?"
YES. Telnet is bad juju. You should use ssh
in stead of telnet. Why? Telnet does EVERYTHING, including
sending usernames and passwords, in the plain. ssh is nice
because it creates a nice encrypted connection. Plus you can use
scp (a way to "ftp" files over ssh. scp stand for secure copy.)


"Would you like to display "Authorized Use" messages at log-in
time?"
YES. Why? It is a quickly legal disclaimer
that explains that the machine is for authorized use only. Good
when you want to take the bad guys to court.


"Would you like to disable the gcc compiler?"
If you users aren't
programmers, there is no reason to have a compiler on the system that
they can use. Keep in mind a savvy user can code up all kinds of
nasties and compile them right there.


"Would you like to put limits on system resource usage?"
YES!
There is no reason to let your users run rampant with resources on your
system.


"Would you like to run the packet filtering script?"
I would say
NO. Why? I think I can do a better job with my
firewall/proxy/etc setup. While I can see this being useful on a
home system, I just don't see it helping much in production.

Ok, this was a brief look at what Bastille will do. Next week,
I'll go though all the questions and help REALLY lock that box down.

by dstahl

Excellent post.  There was also a Tech Republic article from 2002
"Lock down your system with Bastille Linux" which (although it maybe
somewhat dated was very helpful). 

Bastille has a very good 'roll-back' or uninstall script also. 
This is very handy if you find that you've locked down the linux server
too tightly and need to return to the baseline. 

Again, excellent post.

Regards,
/djs

by jmgarvin

Ok, so here are all the questions that you will be asked:

- "Would you like to set more restrictive permissions on the administration utilities?"
YES.

- "Would you like to disable SUID status for usernetctl?"
Yes. What is SUID?
SUID is a permission that causes something to run as the owner of the
item, not the user who called it. SUID is going to die soon, maybe, but
in the mean time it is best to lock it down.

- "Would you like to disable SUID status for traceroute?"
Yes. Again, because SUID is bad juju. We don't want our users doing this.

- "Would you like to enforce password aging?"
Yes. You should enforce password aging, that is changing passwords after a specified period of time.

- "May we take strong steps to disallow the dangerous r-protocols?"
YES! the r-protocols like rsh and rlogin are all in plain text. This is a security no-no.

- "Would you like to restrict the use of cron to administrative accounts?"
Yes.
Unless you can think of a VERY good reason that users should be
administering cron jobs, make sure you choose yes. I honestly can't
think of a single instance where a user HAS to use a cron job rather
than a simple script.

- "Do you want to set the default umask?"
Yes. umask sets the default permissions automatically when a file or directory is created.

- "What umask would you like to set for users on the system? [077]"
I made an error describing umask earlier. Stress Junkie, thankfully,
caught my most heinous error and squashed it like the bug it was! I've
posted (and in some parts expanded on) what Stress said in the
comments. Thanks for the catch Stress Junkie!  The stuff in bold is from Stress Junkie, the stuff in italics is from the umask man page, and the stuff in plain is from me.

The umask is an XOR mask of the permission bits to set by default when
creating files. The umask value of 077 will result in permission bits
on files of 600. Keeping in mind that the execute bit ( octal 1 ) is
never set by default when a file is created we can
see that the 6 is the XOR mask of 0 ( or more accurately of octal 1 )
and that the two 0s are the XOR mask of 77.

As
I stated earlier, if we do this via octal guessing it could take some
time. Anyway, we need to know how the permission bits work:
4 - Read
2 - Write
1 - eXectute
So 7 gives full permission to do EVERYTHING.

XOR logic is as follows:

Input Output
00 0
01 1
10 1
11 0

Here is a blurb from the man page:
The user file-creation mode mask is set to ooo . The three octal
digits refer to read/write/execute permissions for owner, group, and
other, respectively (see chmod(1) , chmod(2) , and umask(2) ). The
value of each specified digit is subtracted from the corresponding
``digit'' specified by the system for the creation of a file (see creat
(2) ). For example, umask 022 removes write permission for group and
other (files normally created with mode 777 become mode 755; files
created with mode 666 become mode 644).
#
If ooo is omitted, the current value of the mask is printed.
#
umask is recognized and executed by the shell.
#
umask can be included in the user's .profile (see profile (4) ) and
invoked at login to automatically set the user's permissions on files
or directories created.

I think that should clear things up?

Many/most Linux distributions will set the default umask to 022. This
is also the traditional Unix setting. It makes no sense from a security
point of view. I always edit the /etc/login.defs file to change the
default umask to 077.

The nice think about Bastille is that is does this for you. However, you can do this manually via Stress Junkie's suggestion.

This
is useful even on a home computer that accesses the Internet. You can
keep all of your confidential information in one account and use
another account to access the Internet. If you set up your security
such that each user account is protected from the others then you can
log on to your computer using the Internet access account. When you
want to access your email or resume or financial software you can use a
terminal emulator and the
sux command to log on to the account with the confidential information.

sux
is nice because it is basically su on 'roids. It "transfers" the X
environment to a new user shell. As far as I know all modern
distros have this.

Be sure to use the dash (-) when invoking the sux command. The sux
command is the X desktop sharing enabled version of su. You can create
aliases such as alias opera="opera 2>/dev/null" so that you can
invoke X software from the command line when you are logged on to the
account with the confidential information. So you want a umask of 077
for maximum security. You can use different user accounts to keep
confidential information from being browsed by malicious Java code. You
can use the sux command to log on to the
account with the confidential information while your console login is
in the account to access the Internet. You can create aliases for X
applications that will pipe nasty error messages to /dev/null when the
X application is run from a command line.

- "Should we disallow root login on tty's 1-6?"
No. This can help, but it might be a PITA depending on your setup. Sure
it locks down root, but you can lose some functionality.

- "Would you like to disable CTRL-ALT-DELETE rebooting?"
Yes, for obvious reasons.

- "Would you like to password protect single-user mode?"
Yes. Single user mode allows only root to log in (run level 1). This is
good, but you want to make sure that some shmoe can't just reboot the
computer into run level 1 and be root.

- "Would you like to set a default-deny on TCP Wrappers and xinetd?"
No. As explained before.

- "Should Bastille ensure the telnet service does not run on this system?"
Yes. As explained before.

- "Should Bastille ensure inetd's FTP service does not run on this system?"
No. FTP is still useful, but it is a security threat. If you aren't using FTP, than lock this down by choosing Yes.

- "Would you like to display "Authorized Use" messages at log-in time?"
Yes. As explained before.

- "Would you like to display "Authorized Use" messages at log-in time?"
Just put in the default or change it via your legal department.

- "Would you like to disable the gcc compiler?"
Yes. Unless your users are programmers, lock this down.

- "Would you like to put limits on system resource usage?"
Duh! YES!!!

- "Should we restrict console access to a small group of user accounts?"
No. Unless you need to lock down your console. Now, this may come in
handy if you don't want your users using consoles, only X, but this
could back fire.

- "Would you like to add additional logging?"
Yes. This creates a new log in /var/log. This gives you information
about some kernel events and some of the system events. It can be
pretty handy.

- "Do you have a remote logging host?"
Yes if you do, no if you don't. This can lock down your box too
much...If you aren't sure you should say yes, but verify if you do or
not and change it if you don't.

"Would you like to disable the VRFY and EXPN sendmail commands?"
No. If you are using sendmail, configure it via postfix (I assume you
are good boys and girls that are using postfix). If you are really good
boys and girls you are using qmail.

- "Would you like to deactivate the Apache web server?"
If you aren't running a web server, choose Yes. If you are, choose no.

- "Would you like to bind the web server to listen only to the localhost?"
Choose No. You can do this, but it might cause some problems down the
line. Of course if you don't ever plan on running a web server choose
Yes.

- "Would you like to bind the web server to a particular interface?"
You might want to do this if you plan on running a web service with NAT or some such, however I suggest choosing No.

- "Would you like to deactivate the following of symbolic links?"
Yes! Some of these sym links are bad juju.

- "Would you like to disable CGI scripts, at least for now?"
You might want to do this if you don't plan on using CGI stuff. Now, keep in mind blocking CGI could disable your website!

- Would you like to disable indexes?"
This is kind of a loaded question. I'd choose no.

- "Would you like to install TMPDIR/TMP scripts?"
No. Now if you really want to, you can, but I don't see the point in it.

- "Would you like to run the packet filtering script?"
No. Let your firewall handle this. It is far better to configure your firewall to do this than Bastille.

- "Are you finished answering the questions, i.e. may we make the changes?"
Yes. We are done!

So, Bastille Linux is now setup and your box is ready to rock and
roll! I want your to keep in mind that Bastille is just one piece of a
VERY large security puzzle.

Stay tuned for some Firewalk information and a little about setting
up your own Linux DVR. Ok, I know, a Linux DVR has NOTHING to do
with security, but I do want to post my $0.02 worth. I am
building a DVR for my home and I want to make it rock, but really,
there isn't much to do ;-) I just can't see paying TiVO to do
what they do. I can build a DVR for less than $400, including a
brand new mobo, case, and proc.

by stress junkie

First, thanks for putting all of this technical information together. You present it in a concise yet easy to understand format. Maybe you should consider writing a book or a technical column for a magazine-web site. I know that one of the Linux web sites that I read from time to time is looking for authors. I'll have to search for it since it isn't one of my regular haunts.

Unfortunately I believe that you have got the umask meaning backwards. A umask setting of 077 is the most secure. The umask turns off bits in the access string. Therefore 077 will completely turn off access for group and others. This is one of the things that I always set in a new installation of a typical distribution. Usually the umask on a default installation is 022 which is a security horror. I always edit /etc/login.defs and change the umask from 022 to 077. Give it a try to test my assertion.

umask 077;
touch umask077.tmp;
umask 755;
touch umask755.tmp;
ls -l *.tmp;

Unless you want to give access for other accounts to access new files. If this is the case I would suggest that this is a bad idea. One of the great things about Unix/Linux/BSD is that different accounts can be used to store information that is not accessible from other accounts. This can be useful even on a home workstation. You can have, as I have, one account for general Internet access and another account for personal information. You can log into the Internet accesss account and cruise the web or whatever. When you want to access the account for confidential information you can use a terminal emulator and the sux command to log into the confidential information account. This way you don't have to log off of the general purpose account in order to use email or to edit you r resume or whatever.

I do this and I have a bunch of aliases set up in all user accounts such as the following:

alias kmail="kmail 2>/dev/null";
alias opera="opera 2>/dev/null";
alias OOo="OOo 2>/dev/null";

So, I always log into my general purpose account. When I want to use email I log into the confidential information account by way of gnome-terminal and the sux command as in

sux - confidential

Once I'm logged into the confidential account I can invoke GUI applications from the command line. Since I've used the sux command they will display on the console just as though I've run them from the general purpose account.

I hope you don't mind my contribution. It just seems to me that if you are going to use a security enhanced version of Linux then you would probably want to follow a tight security policy when using the system.

It looks like these blog entries do not reflect my careful formatting. Although I've put in a big effort to use carriage returns to format my post it is all run together when I look at it in the regular view.

by stress junkie

First, thanks for putting all of this information together. You are doing a great job. Hopefully people interested in Unix/Linux/etc will read your posts.

Unfortunately you are mistaken about umask. The umask is an XOR mask of the permission bits to set by default when creating files. The umask value of 077 will result in permission bits on files of 600. Keeping in mind that the execute bit ( octal 1 ) is never set by default when a file is created we can see that the 6 is the XOR mask of 0 ( or more accurately of octal 1 ) and that the two 0s are the XOR mask of 77.

Many/most Linux distributions will set the default umask to 022. This is also the traditional Unix setting. It makes no sense from a security point of view. I always edit the /etc/login.defs file to change the default umask to 077. This is useful even on a home computer that accesses the Internet. You can keep all of your confidential information in one account and use another account to access the Internet. If you set up your security such that each user account is protected from the others then you can log on to your computer using the Internet access account. When you want to access your email or resume or financial software you can use a terminal emulator and the sux command to log on to the account with the confidential information. Be sure to use the dash (-) when invoking the sux command. The sux command is the X desktop sharing enabled version of su. You can create aliases such as

alias opera="opera 2>/dev/null"

so that you can invoke X software from the command line when you are logged on to the account with the confidential information.

So you want a umask of 077 for maximum security. You can use different user accounts to keep confidential information from being browsed by malicious Java code. You can use the sux command to log on to the account with the confidential information while your console login is in the account to access the Internet. You can create aliases for X applications that will pipe nasty error messages to /dev/null when the X application is run from a command line.

by jmgarvin

Stress Junkie,

Ah yes!  You are correct.  I think I need to put down the crack pipe ;-)

I am not sure what I was thinking (chmod perhaps?), but my definition of umask is wonky.

Thanks for pointing that out!  I've fixed it to reflect reality rather than my own crack smoking brain.

by stress junkie

Let me try something that didn't work before.

This line should be a new paragraph.

Hey!!! Why can't I format comments by using carriage return but you can? I already posted this problem in a recent TR discussion of web site upgrades. I don't understand why you can put blank lines in a comment but I can't.

by jmgarvin

You don't get the WYSIWYG interface?  Do you get just the plain jane?  hmmmm....<br> and <p> don't work?

by stress junkie

Thanks for the idea about < p >. You may have noticed that I removed my second comment and put some formatting into my first comment. I don't know why I should have to put in my own < p > characters though. When I looked at the html source of this page I could see the control-M characters but no < p > characters in my own comments.

I don't know if this problem is due to using Opera 8 which I just started using a few days ago. I could try creating a comment using Mozilla or Firefox but I don't want to keep using your blog to troubleshoot this problem.

I will delete this comment after a day or two to give you a chance to read it. :-)

Also, in your blog title Linux, Security, and Firewall Mussings you misspelled musings. Sorry bud. I figured it would be better to mention it than to let it go. When I delete this post nobody else will ever know.

by jmgarvin

You bastard!  Pointing out all my errors!! ;-)

Thanks...I would have never noticed...

by jmgarvin

Today we are going to Firewalk! Ok, so I'm not going to walk over
hot coals, but I am going to show you a neat tool that will help you
"peak" over firewalls.

Firewalk was designed by Mike Schiffman. Mike says "an active reconnaissance network security tool that attempts
to determine what layer 4 protocols a given IP forwarding device will
pass. Firewalk works by sending out TCP or UDP packets with a
TTL one greater than the targeted gateway. If the gateway allows the traffic, it will
forward the packets to the next hop where they will expire and elicit an
ICMP_TIME_EXCEEDED message. If the gateway hostdoes not allow
the traffic, it will likely drop the packets on the floor and we will
see no response."

What this means is we might be able to just peak past the firewall!

So, what do we do? Well, let's install all the libs first. We need:
libnet 1.x.x
libpcap
libdnet

Ok, now that we have these we can download firewalk. If you
aren't using Fedora Core or Red Hat Enterprise 4, you can just grab the
firewalk.tar.gz
If you are using Fedora Core or Red Hat Enterprise 4, your best bet is to get the rpm
Fedora Core 3 Firewalk RPM
Fedora Core 2 Firewalk RPM
Red Hat Enterprise 4

So now, install the libs in the order I gave you. Unpack them via tar.
tar -zxpf libnet.tar.gz
tar -zxpf libpcap.tar.gz
tar -zxpf libdnet.tar.gz

Now change directory into what you just untarred. Now do:
./configure && make && make install

Now if you got the rpm
rpm -vih firewalk-.rpm

You are now ready to rock and roll!

So, the basic idea is this:
You use on IP to go through and the other as a metric.  So if I do a scan, I need two IPs to do the scan.

Next week, we'll do the scan!!  In the mean time, firewalk -pTCP
<ip1> <ip2> should get you a feel for what is going on...

by jmgarvin

Kernel Map
Ok, so I was hoping this would happen! The 2.6 kernel mapper is
out. What it does is create a graphical view of your
kernel. It will look something like this image.

The nice thing about mapping your kernel, is that you have a handy
graphical represenation of what is happening under the hood.
Plus, you have something really spiffy to hang on your wall. I
highly suggest finding a nice 3' plotter and going nuts.

So you can pick up your kernel mapper here.

Firewalk
Ok, so we have firewalk installed, how do we use it? Well, we
need two IPs and a little time. Let's use firewalk to peek past a
firewall!

Let's start with
# firewalk -v
Firewalk 5.0 [gateway ACL scanner]
Firewalk (c) 2002 Mike D. Schiffman
http://www.packetfactory.net/firewalk
for more information.
version : 5.0

Total packets sent: 0
Total packet errors: 0
Total packets caught 0
Total packets caught of interest 0
Total ports scanned 0
Total ports open: 0
Total ports unknown: 0

This is the version of firewalk we are running. It should be 5.0

OK, now we are going to do
this scan for real! Let's scan something and see what
happens. I'm going to start with a traceroute to some IP.
In this case I'll use the IP 1.1.1.1 (ok, it was something else, but
I'll hide it to protect the innocent).
[root@yoda ~]# traceroute -I 1.1.1.1
traceroute to ***** (1.1.1.1), 30 hops max, 38 byte packets
1 10.60.110.1 (10.60.110.1) 17.371 ms 5.859 ms 3.757 ms
2 isp (IP address goes here) 46.440 ms 43.500 ms 44.062 ms
3 more isp stuff (IP address goes here) 79.897 ms 80.069 ms 79.729 ms
4 something.net (*.*.*.150) 80.002 ms 79.740 ms 79.594 ms
5 something.com
(70.8*.*.*) something.com
(70.*.*.*) 80.198 ms 79.539 ms

6 Some ISP
(70.*.*.*) 80.713 ms 79.903 ms
dist-vlan21.dsr1-1.dllstx2.theplanet.com (70.85.127.67) 174.460 ms

7 destination ISP (12.96.*.*) 81.201 ms 80.425 ms 80.741 ms
8 destination (1.1.1.1) 79.408 ms 79.368 ms 79.390 ms

Not that that revieled anything, but let us firewalk to the same IP:

[root@yoda ~/]#
firewalk
-pTCP 1.1.1.1 10.10.10.10

Firewalk 5.0 [gateway ACL scanner]
Firewalk state initialization completed successfully.

TCP-based scan.


Ramping phase source port: 53, destination port: 33434


Hotfoot through 1.1.1.1 using 10.10.10.10 as a metric.


Ramping Phase:


�1 (TTL� 1): expired [1.1.1.1]


�2 (TTL� 2): expired [1.1.1.1]


�3 (TTL� 3): expired [1.1.1.1]


Binding host reached.


Scan bound at 4 hops.


Scanning Phase:


port 21:
A! open (port listen) (1.1.1.1)

port 22: A! open (port listen) (1.1.1.1)


port 23:
unknown (unreach
ICMP_UNREACH_FILTER_PROHIB
) [1.1.1.1]

port 24: unknown (
unreach
ICMP_UNREACH_FILTER_PROHIB
) [1.1.1.1]

port 25: A! open
(port listen) [1.1.1.1]


port 26: *no response*


port 27:
unknown (unreach
ICMP_UNREACH_FILTER_PROHIB
) [1.1.1.1]
port 80:
A! open (port listen) (1.1.1.1)

port 139:
unknown (unreach
ICMP_UNREACH_FILTER_PROHIB
) [1.1.1.1]

port 1025: *no response*


Scan completed successfully.


Total packets sent:..............
135


Total packet errors:
..............0

Total packets caught
:..............
73


Total packets caught of interest:.. 72


Total ports scanned
:..............
132


Total ports open:
..............
2


Total ports unknown:
..............
67

So we know that ports 21,22,25, and 80 are open. This is
good news!  The problem is we've been VERY noisy.   Any
admin worth their salt is going to lock down their firewall and watch
for us again.  So, what was the point!!??  Well, we found out
some information and we know a little more about how traceroute
works.  So now we can footprint machines quite easily.

So, why use firewalk? Well, it is a good way to get an idea of
what your network looks like from the outside. You can poke and
prod and see what you get. If you want more information check out
Mike Schiffman's white paper on firewalk at:
http://www.packetfactory.net/firewalk/firewalk-final.pdf

by jmgarvin

So, I just finished explaining to a few people that Linux CAN work in a
Windows Workgroup environment.  So, I'm going to setup a Samba
share and make it work.  While this isn't anything difficult, it
is fun and interesting.

Just make sure you turn SELinux OFF!!  Man, SELinux and samba
don't seem to get along very well.  If anyone knows a way to make
samba work well with SELinux, please tell me.

See you Thursday!

by jmgarvin

Today London was bombed by a pack of inhuman filth. 

Most of you know me from the TR forums and I am, at least in my own
eyes, pretty mellow and even.  However, this time I am just
sickened by the total lack of respect for life we've seen from Isalmic
extremists.  I'm disgusted by the scum of the earth that would
kill innocent people in the name of god.  I am sick of hearing how
it is god's will to decapitate someone.  I'm sick of hearing how
killing those in the World Trade Center was justified by god.  I'm
sick because I know we'll hear the same about the bombings in London
today. 

I have no sympathy for those that commited these acts.  We should
revist the same acts on their family and friends 10 fold.  We
should treat them like the garbarge they are.  I've had it with
people who think terrorism will advance their inane agenda. 

The terrorist should be eradicated from the planet.  The second
they are caught, they are killed.  There is no trial.  If
they will not give anyone else justice, they should expect the same.

I am beyond angry.  How is it that killing the innocent is acceptable?

To all the TRers that are across the pond, I hope all is well and no
one was hurt. I pray for you and your families.  For the 30 dead,
I can only hope they can find peace in the next life.

by jmgarvin

Woodwoker posted in thread: https://www.techrepublic.com.com/5208-11185-0.html?PromoFeature=discussion&PromoByPassed=1&forumID=90&threadID=177544
I'll bet you thought I was going to try to thread-jack this puppy and go off-topic on Windows, now didn't you?

Actually
I have high hopes for this thread. I'm hoping that there'll be some
consensus about which version of Linux is the best and easiest to use.
Maybe after you *n*xers agree on that, I'm hoping one of you will write
and get TR to publish a step by step guide entitled something like
"Building Your First Linux Box - Written in Language a Windows Guru Can
Understand."

Questions to be answered would include:
1) Do I buy or download my first Linux version?
2) Which version?
3) If I download, how many CDs will the install media take?
4)
What are minimum system requirements? (I keep reading the old x86
doorstop with 64 MB and 30 MB hard drive will run Linux. True?)

5) How soon from the time I start the install until I'm surfing the Web on my very first Linux box?

Help this old Winders-dude learn what all the open source fuss is about.

So, I'm here to help out.  I'll explain how to choose a version,
how many CDs you'll need, and what you need to know about your system.

Keep in mind, I'm looking at a desktop distro, so this isn't going to be about servers.

by jmgarvin

So, I'm ready to answer Woodworker's questions about how to install Linux and what he should do.

1) Do I buy or download my first Linux version?

You can buy Linux distros or you can download the ISOs. For a noob, I highly suggest going to http://distrowatch.com/. You can download or buy at this stage. If you don't know how to burn an ISO, go ahead and buy a distro.

You can also pick up Ubuntu for free. They will ship it to you, free
of charge, in a nice package with two CDs (one live, one
install). You can pick up Ubuntu at: http://shipit.ubuntulinux.org/

2) Which version?

I like Fedora Core 3 with Cedega (a Windows with DirectX
emulator). However, there is much to be said for the other
Distros. I think Fedora is more rubust as a desktop, but a little
light for a server.

3) If I download, how many CDs will the install media take?

Fedora Core 3 or 4 takes 4 CDs, plus if you wish a recovery
CD. Debian takes up to 8 CDs and other distros vary from 1 CD all
the way up to 10.

4) What are minimum system requirements? (I keep reading
the old x86 doorstop with 64 MB and 30 MB hard drive will run Linux.
True?)

Technically you can run most Linux distros on something like a P100
or less. The problem is the GUI will run like a dog, the command
line stuff will run just fine. Slackware can run on almost any
old piece of garbarge you can throw at it. While something like a
P100 would be great for a home firewall, it is pretty limited and
mostly command line.

5) How soon from the time I start the install until I'm surfing the Web on my very first Linux box?

A full install of FC3 on a P4 1.5ghz will take ~30 minutes.
That is 6 gigs of installing. So take from that what you will.

Also, contrary to popular belief, you really only need a /, /boot,
and swap on a home system. I recommend at least 512mb of swap (1
gig if you plan on doing anything with video, audio, coding, or
games).

Also, you don't have to recompile you kernel to get your
video drivers. Just go to rpm.livna.org.

To setup yum in FC3, simple add this to your /etc/yum.conf:
### See http://fedoraproject.org/wiki/Extras/UsingExtras
### And insert here the Fedora Extras repository configuration

### And then add these lines to access rpm.livna.org repositories:
[livna-stable]
name=Livna.org Fedora Compatible Packages (stable)
baseurl=http://rpm.livna.org/fedora/$releasever/$basearch/RPMS.stable
gpgcheck=1

[livna-unstable]
name=Livna.org Fedora Compatible Packages (unstable)
baseurl=http://rpm.livna.org/fedora/$releasever/$basearch/RPMS.unstable
gpgcheck=1

[livna-testing]
name=Livna.org Fedora Compatible Packages (testing)
baseurl=http://rpm.livna.org/fedora/$releasever/$basearch/RPMS.testing
gpgcheck=1

[extras]
name=Fedora Extras - $releasever - $basearch
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/$basearch/
gpgcheck=1
gpgkey=http://download.fedora.redhat.com/pub/fedora/linux/extras/RPM-GPG-KEY-Fedora-Extras

[extras-testing]
name=Fedora Extras Test Updates - $releasever - $basearch
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/testing/$releasever/$basearch/
gpgcheck=1
gpgkey=http://download.fedora.redhat.com/pub/fedora/linux/extras/RPM-GPG-KEY-Fedora-Extras
enabled=0

[extras-debug]
name=Fedora Extras - $releasever - $basearch - Debugging packages
baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/$basearch/debug/
gpgcheck=1
gpgkey=http://download.fedora.redhat.com/pub/fedora/linux/extras/RPM-GPG-KEY-Fedora-Extras
enabled=0

Get the gpg keys:
Generic Fedora Key:
rpm
--import /usr/share/doc/fedora-release-3/RPM-GPG-KEY*
Generic livna Key:
rpm --import http://rpm.livna.org/RPM-LIVNA-GPG-KEY
Generic Extras Key:
rpm
--import http://download.fedora.redhat.com/pub/fedora/linux/extras/RPM-GPG-KEY-Fedora-Extras

Other keys can be found at Fedora FAQ.

Now install the nvidia driver:
yum install kernel-module-nvidia-$(uname -r)

Or install the ATI driver:
yum install kernel-module-fglrx-$(uname -r)

If you have any more questions feel free to ask!

by itgirli

Hey, that Ubuntu thing, how well does that work? Have you used it? Should I bother?

by jmgarvin

Ubuntu is quite nice.  It works very well and is quite free. 
I wouldn't use it as a server, but I do like it as a desktop.  It
is also pretty "entry level," so even the novice user can fire it up.

I'd go ahead and order 10 or so for friends and family.  Enjoy!

by itgirli

Yeah. I ordered 10. I was just wondering witht hte whole bit about being free, what the catch was. There is always a catch. Yes, I'm a cynic.

by stress junkie

I would recommend either Ubuntu or Knoppix for an absolute first
experience. Just boot off of the CD or DVD. It will (more than likely)
set up your network for you if you have broadband. You just boot and
go. Naturally the software will run faster if you install and run the
system from a hard disk.

by itgirli

I've ran Knoppix, Red Hat, and Mandrake. I have a few I haven't tried. That's what I like about linux, there is always something new to try.

by jmgarvin

So, you want to share directories and files like you do in Windows, but
you only have Linux.  No problem.  NFS (Network File Sharing)
is a handy dandy tool for all your needs.

The first thing to know is that nfs is pretty easy to deal with in the GUI, so I'm not going to tell you much other than:
1) Click Applications -> System Settings -> Server Settings -> NFS
2) The share name is the directory to be shared and the host is the IP or machine name that is the NFS server for that directory

Ok, so now to setup NFS on the command line:
1) create a directory to be shared /shared is a good name
    mkdir /shared
2) go into that directory and create a file to make sure you are sharing it out properly
    vi /shared/testing.txt
          Hello this is the remote machine IP 10.10.10.5
3) now, edit your /etc/exports file that is read only.  If you wish to have read/write permissions it is rw rather than ro
    vi /etc/exports
       /shared (ro)
4) start the service
    service nfs start
or if the service is already started
    service nfs restart

That's it!  You are serving out a NFS share.  If you want to
test it, log in as a user (we aren't allowing root to use NFS...if we
wanted to we'd have to create the share like /shared
(ro,no_root_squash) or some such syntax).  To mount the remote
file system:
1) make a directory to mount to
    mkdir /test
2) mount the remote directory
    mount <remote host IP or name>:/<shared
directory>    /<directory to mount to on your
system>

3) now make sure it mounted
    less /<directory mount on your system>/test.txt

If you want it to automount on boot edit your fstab
vi /etc/fstab
<remote host IP or name>:/<shared
directory>         
/<directory to mount to on your system>    
auto noauto,managed 0 0

by jmgarvin

So today in the thread https://www.techrepublic.com.com/5208-11193-0.html?forumID=4&threadID=177494&messageID=1805624
a member apotheon was getting veiled threats from 8492. While
this behavior is pretty typical of web boards, it doesn't seem to be
typical of TR.

What is the most perplexing is that this 8492 has only been around a
short period of time. He is attacking apotheon and calling him a
liar about his profile. Further, this user seems to have some
vendetta against apotheon and what he is saying. The strangest
thing is that his email address isn't valid.

I just don't understand how some users operate and why threatening
people in a TECHNICAL discussion makes any sense. Let's face it,
we are all pasty faced geeks. We aren't fighters we are
technology lovers....can't we all just get along?

Anyway, I think this is someone playing a joke on apotheon, but you never know...

by apotheon

Yeah, it's either someone playing a (not very clever) joke, or it's someone that is
a (not very clever) joke. Either way, it's kind of amusing. I have some
notions about who it may be, and some very specific ideas of who it
wouldn't be even though such people are entirely capable of a "joke"
like this.

I suppose it's even possible this person is "for real", insofar as this crap can be "for real".

I'm hoping he/she/it slips up soon and does something that indelibly marks him or her identifiably. That'd be fun.

By the way, thanks for the faithful readership at my own tech blog. I'll make an effort to post the next installment of Understanding OSes when I get home [tonight|this morning] after work.

by itgirli

Wow! what a tool! Whoever it is, they seem to be one in a million. Do you have any ideas of who it could be? What an arse.

by apotheon

I've got a few ideas, but I'm sure I'm overlooking several people of so little importance in my thoughts that they just escape notice, and even if it's one of those of whom I'm thinking, it's not easy to narrow it down at the moment. Even the sorts of typos and other errors that are made are common to more than one person.

Only one person on this site is currently in my radar as a potential candidate, but that doesn't mean it couldn't be a different person on this site. I'm not going to name any names, though, so that I won't unnecessarily cast aspersions. Regardless, all I've got left at this point for the matter is idle curiosity and some contempt. I'm particularly impressed by the vanity it takes to suggest that some minor hint should give away who it is, as though catchphrases and obscure references are both unique to that individual and attached to memorable experience rather than the simply forgotten and unmiportant.

By the way, jmgarvin, I posted the next in my Understanding OSes series when I got home from a long night at the datacenter. I can't swear it's not fraught with factual errors brought on by sleep deprivation, though.

by itgirli

Would it have to be someone here, or could it be an outsider who knows you post here and has slowly been infiltrating the ranks to build up his own credibility before trying to take you down? Where there any kids in school you used to beat up? That's what this character sounds like. A little twerp whose butt got kicked in school and warped his fragile little mind into thinking he's got some big vendetta to uphold. Either way it is a bit curious, and somewhat puerile really, though with threats such as those, I hope it is innocent.

by apotheon

Sorry, I wasn't clear. I meant to make it obvious that I think, if it's someone out to get me personally for something unrelated to this thread (still not proven), it's probably someone that knows (of?) me from outside TR. So yes, I do think it's possible, and was trying to convey the notion that this is in fact probable.

By the way, no, I didn't beat people up in high school. I didn't really get beaten up, either, though that would have been a more likely possibility. I've changed a lot since then — but as they say, the more things change, the more they stay the same. I'm not as easy a target these days, but I'm perhaps even better at keeping fights from happening at all.

by jmgarvin

Absolutely bizzare!  I just don't get some people.  You
really have to wonder if the 8492 will ever out themselves.  I
tend to think this is a flash in the pan and we will never see 8492
ever again after this little exchange.

by glennxlee

Just consider the source and move on. He has the problem and only he can deal with it. If he doesn't like what is being said or what is going on, he doesn't have to stay on this list.

by stress junkie

I remember that apotheon was absolutely persecuting one TR member a
couple of months ago. I thought that it was hilarious. This member
tried changing his moniker several times over a week to try to get away from apotheon's criticisms. Naturally that
didn't obscure his previous posts. I don't remember any of his monikers.

I happened to discover this crusade by apotheon against this member when
their posts happened to end up in a discussion thread that I was
reading.

While apotheon's posts have become genuinely civilized lately I think
that this 8492 person is trying to turn the tables on apotheon's
previous style. This is partially supported by the fact that in one of
these 8492/apotheon exchanges I noticed that 8492 had changed his
moniker to something like 101100101 for a few minutes which I caught in
a page refresh. He went back to 8492 by the next time that I refreshed
the page. If I'm correct then it is a pity. I hate to see someone seek
revenge after the other person has turned over a new leaf.

I'll finish by saying that I think that apotheon's posts are much more
valuable to the discussions since he changed his style. Previously I
just enjoyed watching the sparks fly. Now his ideas are worth
discussing seriously. And I fully realize that some of my posts are
more emotional than technical so I'm not trying to preach about style.
I enjoy reading emotional posts from people like Oz_media for their
entertainment value more than for their technical content. It's all
good. :-)

by gunnar klevedal

According to my opinion Apotheon has very interesting things to say. He also has a very good command of the English language. He should not be harrassed in any way.

I read his article about Programmers, Languages, OSes in his Web Log with great interest.

My vocabulary is not complete. What is a Code Monkey? What do the Script Kiddies do?

Regards

Gunnar Klevedal

by jmgarvin

So, tomorrow, I'll talk about setting up a Samba share in webmin. 
Sure you can use SWAT, but I think webmin has a cleaner interface for
setting this up.  I'll also go over how to setup NFS in
webmin...cool stuff!

by apotheon

I've always done all my Samba configuration by opening typing something like "vim /etc/samba/smb.conf" and editing the file. Maybe I should learn to do some things from Webmin now and then, just so I can give advice to those not as inCLIned as me, if nothing else.

Of course, I may never have gotten CUPS configured without Webmin. CLI configuration of CUPS is not only not for the faint of heart — it's not for much of anyone. Even Eric Raymond finds CUPS configuration nearly impossible.

by jmgarvin

One of the reasons I've started to webmin more and more is that some
places actually don't allow SSH through!  The allow http and https
traffic, but not ssh.  So, using a nice secure web interface means
that I have the security of sshing into a box and a handy all in one
tool for me to use from ANYWHERE! 

Now, webmin does have its problems, but it seriously simplifies many tasks.

by jmgarvin

Finally, I've gotten back (not quite tomorrow, but close) to putting up how to setup a Samba share in Webmin. Now, this is pretty easy and not much of a hassle, but you MUST have webmin! I highly suggest NOT going to webman, but they are your eyes. :-) I also posted on how to install and use webmin in my blog.

On to the show...

Setting up Samba via Webmin

Log into Webmin and click the servers tab. This will take you to
a LARGE list of servers you can setup and maintain in Webmin.
Click on the Samba Windows File Sharing link. This will open all
the Samba options for your. If you currently have Samba shares,
you can edit and maintain them from here. By default webmin sets
up homes and printers as a Samba share. You can remove or edit
these as you please.

We need to create a workgroup by clicking on Windows
Networking. Create a workgroup name and change your Windows
Computer to that same workgroup name. Make sure to give it a
description that fits with what you need. Also make sure the
security is set to Share Level.

Click on File Share Defaults and choose Security. This will
let you choose who can log in. I typically allow all hosts, but
you can limit it to specific hosts if you wish. Save and go back
to File Share Defaults. Make sure Available and Browsable are
both yes.

Now, let's assume you want to share homes. Go back to the main
Samba menu and click on homes. Now make sure that both Available
and Browsable are clicked to yes. If you want to change the
security level (so that others may write to the share) click on
Security and Access control. Now click Yes to Writable.

Make sure to click Restart Samba Server or Start Samba
server. If you are having problems, go to the command line and
type service smb start OR service smb restart. If you don't have
the service command available you will have to use /etc/rc.d/init.d/samba start OR /etc/rc.d/init.d/samba restart.

Now edit samba users. Make sure to add anything after 499.
Why? Users typically start at 500, so you want to add those users
to samba. If you don't you can just pick and choose by UID.

In that same term log onto your samba server. Your default is
smbpasswd . Username is a valid Samba user.
This creates the authentication file for Windows to check when you are
logging into a share.

Go to a Windows box and click on Network Neighborhood and browse
your network. You should see your Samba share right there!
Now click on the share and input your samba password you created.

You can also use Samba SWAT, but that is a VERY easy too to
use. If you want SWAT instruction, I'll be happy to post
it, but I think it is pretty self explanitory.

by pblake71

Could you also post a Howto on setting up windows users to access the shares? I have tried and tried with no success. I'm sure I am missing the obvious....

by cuzzinchris

I find that if you set up windows user accounts that are identical to to the samba user accounts (same user/pass) you can browse directly to samba shares without having to enter a user/pass since it is the same as when you log on to your windows user account. Just something I thought I'd add. If you set the permissions just right on a particular samba share and set the password on that share as blank, anyone who logs on with a windows account should be able to access that samba share. Another thing that I have experienced is that if you mount an NTFS drive on a Linux box then share that with samba you will only have read access but not write access, no matter how unrestrictive the permissions are. But if you mount a FAT drive you will have full read/write access according to the permissions. Not sure why that is.

by jmgarvin

So my next posts will be about Squid and Squidguard.  I will talk
about installing, setting up, and some maintenence of the apps. 

I'm also going to push forward with other security tools like tripwire
and snort.  I do, at some point, want to talk about qmail and why
you should use that and not sendmail/postfix.  I know it is a
religious war, but I strongly believe that sendmail/postfix cannot be
secured as well as qmail.  Plus, IMHO, qmail is far easier to
setup than sendmail/postfix.

See you soon!

by stress junkie

We're waiting.  :-)

Surely you coudn't have anything MORE important to do than to write up
original user documentation for Squid. You'll probably just use Webmin
anyway. :-)

by jmgarvin

Don't make me go even MORE crazy! ;-)

It is has been a busy past couple of weeks.  It was midterms and
inservice.  I have also been trying to get my committee together
for the fall semester...just so much to do, so little time...

'Course it is only squid in webmin, so nobody cares anyway...

I HOPE to have it up in the next 3 or 4 days.  I just need to
finish setting up Squid in Webmin so I can give you valid direction :-)

by jmgarvin

If you have read Wired recently, you saw this article: Whistle-Blower Faces FBI Probe.

While normally I wouldn't comment on something like this, I am driven to say something.  For those of you not in the know, the long and the short of this is that Cisco is mad that a man, named Mike Lynn, release Cisco IOS vulnerabilites at the Black Hat conference recently.  Cisco claims that Mr. Lynn violated trade secrets.  So, Cisco, in a brilliant PR move, not only tries to force Mr. Lynn to remove his presentation from Black Hat, but also sends the FBI after him. 

I have never seen Cisco act in such a way.  I am sickened that they would attack the messenger and not the message.  If their IOS is vulnerable to ANY attack, they shouldn't be attacking Mr. Lynn, but praising him.  Not only do the bad guys already know about the vulnerabilities, but they could be taking advantage of them without anyone noticing.  Mr. Lynn brought to the security crowd issues that must be addressed!  He decided to take the hit and resign from Internet Security Systems.  Cisco and ISS both knew that Mr. Lynn was going to present well ahead of time and Cisco even requested that Mr. Lynn do the reverse engineering on their IOS! 

Mr. Lynn, during Black Hat, did not reveal any technical details on what he did.  He simply reported on what was possible.  Why Cisco/ISS or the FBI are pursuing this case any further, I just can't understand.  What Mr. Lynn did was advise others that there is a flaw in Cisco IOS that needs to be addressed.  As security administrators, WE NEED TO KNOW WHAT THE FLAWS ARE! 

Cisco normally doesn't act in such a greasy way, but perhaps this is the new Cisco.  Perhaps they don't want people to know about serious security flaws.  Perhaps they don't care that the thousands of switches and routers that can be affected aren't being treated as possible attack vectors.  I just don't know what Cisco or ISS is doing.  Why are they going after someone who only released information that there was a security flaw with Cisco IOS?  What will this do to the security community?  Will the entire security community eventually have to head underground to report flaws and security issues? 

What bothers me the most is that Cisco called in the FBI.  This is not only silly, but it seems to point out that Cisco doesn't understand WHY we need to know these things.  Cisco thinks reverse engineering only happens in a lab under controlled conditions apparently.  Well, I have news...It doesn't.  I'm sure someone had already discovered the IOS flaw before the Black Hat conference. 

A note to Cisco/ISS: What could this stunt that can gain you nothing but bad press prove?  Is there something else behind this that Cisco/ISS would like to reveal?

Squid/Squidguard

Ok, so I STILL haven't finished with the tutorial.  It is pain to build this one.  Squid is pretty difficult and SquidGuard is hard to administer without some explanation.  I hope to have this finished soon, but I just don't know when.

by lesko

While everyone is bashing Cisco for their move, I tend to agree with
what they did. Its all about responsible disclosure. Lynn disclosed the
vulnerability in a Black Hat conference.  If it was an FBI
conference or a developer conference of some sort then it would not
have been that bad.

I agree with the part of your post that says "WE NEED TO KNOW WHAT THE
FLAWS ARE" but even if I knew what they were I do not have the source
code to fix them so might as well wait for Cisco to fix the flaw and
let as few people know as possible.

I maintain a small network with about five hundred network devices of
varying age and I get security advisories from Cisco through http://www.cisco.com/go/psirt
  and for the most part I apply those patches the same evening but
I highly doubt admins for big companies with thousands of devices with
7x24 operation have the liberty of doing.  I get security
advisories several hours if not a day before the flaw is published in
security sites and often times they either have a fix or a workaround
for it already.

What the press did by making a huge deal about what Cisco and ISS tried
to do with Lynn in my opinion, fueled the race to create an actual
exploit that will compromise Cisco IOS devices.  If you follow the
news articles here at Tech Republic and in eWeek you will notice that
"Security Reseachers" are building the exploits and they said it will
be done before the end of Defcon or the european security
conference.  Its a game now, who ever builds the exploit first is
the new hero in the community thanks to the press.

by lesko

While everyone is bashing Cisco for their move, I tend to agree with
what they did. Its all about responsible disclosure. Lynn disclosed the
vulnerability in a Black Hat conference.  If it was an FBI
conference or a developer conference of some sort then it would not
have been that bad.

I agree with the part of your post that says "WE NEED TO KNOW WHAT THE
FLAWS ARE" but even if I knew what they were I do not have the source
code to fix them so might as well wait for Cisco to fix the flaw and
let as few people know as possible.

I maintain a small network with about five hundred network devices of
varying age and I get security advisories from Cisco through http://www.cisco.com/go/psirt
  and for the most part I apply those patches the same evening but
I highly doubt admins for big companies with thousands of devices with
7x24 operation have the liberty of doing.  I get security
advisories several hours if not a day before the flaw is published in
security sites and often times they either have a fix or a workaround
for it already.

What the press did by making a huge deal about what Cisco and ISS tried
to do with Lynn in my opinion, fueled the race to create an actual
exploit that will compromise Cisco IOS devices.  If you follow the
news articles here at Tech Republic and in eWeek you will notice that
"Security Reseachers" are building the exploits and they said it will
be done before the end of Defcon or the european security
conference.  Its a game now, who ever builds the exploit first is
the new hero in the community thanks to the press.

by el_gazzítò

Hi all.

I have been delving into this matter further and I have found some contradictions ...

* At the Black Hat conferences after the shit had hit the fan, some people there had said to the press that: "This vulnerability has already been fixed by Cisco in the latest versions of their IOS." also: "This exploit only affects routers running IPv6, so routers running IPv4 are safe from this attack." and also: "This is a vulnerability that can only be executed on the local network and not from remote. You could bring down your own router with this exploit, but not a remote one." ... <--- These are typical "downplay responses" trying to downplay the potential effects of the exploit. I don't know why people are still trying to de-fuse bombs after they have already gone off in their faces...

* The way that Cisco officials have handled this situation just proves that they have poor to no discrimination, if these statements in the previous point are true. Yes I know that this involves the release to the public of Cisco's "Intellectual Property", and all the legal mumbo jumbo that follows thereafter, but if the above statements are true, then this exploit is really pointless to perform, not to mention just too much of a hassle for anybody to bother with. What is the point of bringing down a local router other then to disconnect your network from a remote one? I know of a far easier way to do this and it's called turning the router's power off!!!

* At an interview after this had all happenned, Michael stated: "I have only given about 5 percent of the technical information needed to perform this exploit." and "I wasn't prepared to wait another year for Cisco to continually test and retest my findings and write a fix, after which a potential worm might have been written to make use of this exploit." and "I still think I did the right thing." <--- HELL YES you did the right thing... It took Boar balls to "Stick it to da man!!" like you did. Let me explain my opinion on this...

* The title of the talk that Michael gave was: "The Holy Grail: Cisco IOS Shellcode and Remote Execution." meaning that he had found a way to make use of this exploit remotely, ie from the internet. He said that he wasn't prepared to wait for Cisco to write a fix for this exploit. Meaning that this was a variation of the exploit that could be performed locally and he had found a way to execute it from remote. Also for this particular exploit, Cisco were still in the research phase of their "patching" and were using information supplied by his research.

* The way to achieve this exploit is by trying to guess, what the router IOS's stack and heap pointers are at a certain given point in time... Hello!? Do I have your attention yet!? Seeing as Router memory maps and therefore the IOS differs in different models of Cisco routers, you'd have to have the following information: A) the type of router that is on the remote end, B) a very in-depth knowledge of ALL IOS versions on ALL Cisco routers. I don't know about you guys, but if this exploit can only be performed locally, then I'm sorry but "My glasses just aren't thick enough" to know this information, much less to say I have better things to do and the power switch is looking like a much easier way to bring the router down for me... :-)

* Cisco was trying to play Hard-Ball with ISS and Michael Lynn, by trying to force the removal of Michael's talk from the Black Hat Conference's curriculum. Michael hit back by quitting his job and performing the talk anyways.

* This says to me two things: A) Cisco has the same approach to patches as Oracle does (Which is very bad for those that don't know this.) and B) How many other patches have gone the way of the dodo because Cisco had used the same "Strong Arm" tactics against other people, who didn't have the same "Boar sized" Cohon?s that Michael Lynn had in the same situation? :-)

I'm sure that many people out there have the same opinion that I have about this. I know that there are heaps of people that would have opposing opinions about what Michael Lynn did. To those people I say this: If you read between the lines on this entire issue and what has happenned here, These things will show up:

A) Cisco was opposed to Lynn's research being published, and Lynn was trying to get them to write a patch for this new exploit quickly.

B) Cisco strong armed ISS and Lynn saying that they (Cisco) had to do more research to prove it and write a patch to fix it, telling ISS to keep it quiet. Michael knows that time is of the essence here. He knows that if he can do it, someone with as much knowledge as he has, but malicious intent might discover this exploit also.

C) Knowing that Cisco needs to act now about this, rather than re-proving that this can be done, as his (Michael Lynns) research has already proven this, he knows he must go public with the information that he has, to get Cisco to act quickly on getting a patch completed.

D) He quits his job at ISS and goes public with what he knows, effectively kicking Cisco's butt so hard it's left with two dints in it's ass.

:-)

E) Cisco doesn't like being hit back so it gets the FBI after Michael Lynn and you all know what happens from there.

All I can say about this is, If I was Cisco and someone had found an exploit that could bring down a router that I manufactured remotely, I'd be opposed to it being published as well, but I'd also do my best to get a patch out quick smart, not downplay the event as has been done here, effectively trying to de-fuse the bomb after it has gone off...

??? Hasta Lasag?e !!!

??? El_Gazz?t? !!!

by jmgarvin

Well, most of you will notice I haven't blogged in a while. For
the most part, at first, it was simply because I was busy and putting
together a Squid/Squidguard tutorial is pretty difficult. I'm
probably about 75% finished with it, but I've come to a stand
still. Why, you may ask? World of Warcraft (WoW).

I play for maybe an hour a day (sometimes a couple) and I just love this game. I've really gotten into the whole idea of MMORPG.
I've had a ton of fun playing and I've even met a few new
friends. What is so fun about running around smashing mobs?
I don't know, but WoW makes it fun.

I'm currently on the Frostmane server (I switched from the overloaded Frostwolf) and I am playing a Tauren Warrior named
Nimbew. Ok, so it is Webmin backwards...I'm cheesy. I'm
awful at coming up with names. So Nimbew is level 17 and
counting. He's explored many areas, fought (sometimes to the
death) countless mobs, and had to do a fair share of running from stuff
he shouldn't have tangled with. Some of the quests he has
gathered are quite hard and some he has screamed though. I'm also playing Cenarion Circle
as a Level 15 Human Paladin named Agedec of the Eternal Honor Guild and a Level 1 Night Elf Hunter named Xinul.

One of the nicest things about WoW is that the quest system is easy to
understand and easy to deal with. The hardest thing about it, is
getting too many! It is far too easy to grab 20 quests and not
complete a single one for a number of hours. Some quest require
you be hunt, some require fighting, some require strategy and
skill. Some quests are in what are called "instanced"
areas. These are areas specifically "made" for you and your party.

The other fun part is you get to meet people. Sure, meeting
people is dull and you really don't want to have anything to do with
most people, but in WoW, you actually have something to talk
about. Plus, you are talking to an Orc Shaman
not some Joe on a communter train. The Shaman is there to work
with you can probably has some of the same quests. Plus, you get
to split XP and loot of stuff you couldn't defeat on your own.
The coolest thing is that it seems the more mature crowd plays
WoW. Most of the people I've met are in their 20's or
30's...which is a far cry from when I played Everquest.

The coolest thing? I'm playing WoW in Linux. I'm using Fedora Core 4 (recent upgrade, I suggest if you are using FC3 that you upgrade to FC4) with a wireless connection (ndiswrapper, you rock, but D-Link you can burn and die) and cedega
(Transgraming also puts out Point2Play which is a GUI version of
cedega). My setup is a 1.6ghz Athlon, 1 gb RAM, 128mb Geforce 5600,
and a Sound Blaster Live!.

So if anyone is playing WoW and is on Frostmane and sees a guy named
Nimbew run by with a few high level mobs chasing him...That's me just
getting in to virtual trouble. I'm also on Cenarion Circle as a Paladin named Agedec. If you play WoW, what server are you on and why do you play?

by stress junkie

I thought WoW meant Whip 'em Out Wednesday. Maybe it's a New England
thing. Every Wednesday our young female breeders whip out their breasts
at various random times during the day.

I love New England.

by jmgarvin

Man, I live in the wrong state...Perhaps I can start Whip 'em out Wednesday in New Mexico ;-)

by nnyantengwar

Just ran into your post and I'm really interested in getting WoW running on Linux.  Can you indicate what type of performance you're getting and better yet post a guide?

 

Thanks!

by jmgarvin

Sure, I'll post a guide.  It is quite easy.

Performance wise, I only took a performance hit when I first entered a
large city.  After everything buffered, all was fine.

On that note, you probably want to have a large swap space and a large
amount of RAM (1 gig for each).  The reason is that you can buffer
more information.

Keep in mind I have found a few bugs, and I will post them in my guide.

by jdclyde

Let me get this straight, your running 512 Ram but you recommend a gig?  your slacking..... lol

I need to tear my gaming system apart to see why it is dumping all the time.  Processor or video, just not sure which yet.

Is there a special version you have to get to run on linux or is it a
multi install?  From following your other links I am interested in
checking this out and if I could do it on linux at the same time I
would be killing two virtual birds with one maul.

Question, how long have you been playing to reach lvl 12?  Does it
progress quickly?  I know in Diablo2 I can get a character up to
lvl 20 in about two hours, even though most are useless until lvl 30.

You have given me my next goal, my friend.   Just can't start
for about a month.  Back to school shopping for the boys, ya know.

by jmgarvin

"Let me get this straight, your running 512 Ram but you recommend a gig?  your slacking..... lol"

I am SO behind the power curve.  Just because of this post I'm going to go pick up more RAM this weekend ;-)

"I need to tear my gaming system apart to see why it is dumping all the time.  Processor or video, just not sure which yet."

My bet is that you are having a driver conflict with your video and audio.  That almost always is the case with current games.  If you are using EAX and various other goodies, turn them off first and see what happens.  Work your way up by turning on video then audio goodies.  That should solve your issue. (esp with D2, IIRC EAX caused no end of trouble)

"Is there a special version you have to get to run on linux or is it a multi install?  From following your other links I am interested in checking this out and if I could do it on linux at the same time I would be killing two virtual birds with one maul."

I am using Fedora Core 4 (and to an extent 3), but from what I understand Cedega/Point2Play will work with bleeding edge Debian, Slackware, SuSe 9.x, Gentoo, Ubuntu, and various other distros.  The fact that is works in slack means it should work in any plain jane. 

I'd go with FC4 or Gentoo (if you are comfortable with a difficult install).  FC4 has better luck with modern video/audio and opengl just seems to work better (at least in games).  I've grown to hate SuSe, so don't listen to me on that ;-)

"Question, how long have you been playing to reach lvl 12?  Does it progress quickly?  I know in Diablo2 I can get a character up to lvl 20 in about two hours, even though most are useless until lvl 30."

It took about probably about 15 hours or so of play time to hit that.  I spent a lot of time just wandering around looking at the cool views ;-)  I'm level 17 now if that is any indication. 

You max at level 60 and once there you can do all kinds of cool stuff.  WoW is also built for the casual gamer.  You can level up easier if you don't play for a few days (kills are worth more XP).  Quests are tough and you need a group, but it is pretty social (although it can be hard to find a group in the afternoon). 

"You have given me my next goal, my friend.   Just can't start for about a month.  Back to school shopping for the boys, ya know."

Let me know when you start playing.  I'm horde, so make sure not to be the whimpy alliance dweebs ;-).

On that note today I had an interesting experience.  The server freaked out a touch.  All the mobs, all the characters, and all the trasportation just went "poof."  I was on a zepplin at the time...and over water of course.  It was lucky we were over water or the fall probably would have killed me.  So I had to swim about 3 minutes back to land.  Once there everyone started to disappear. 

So, I logged off and fragged some noobs in Enemy Territory ;-)

by ryan.gould

Yea, its not so hard to level up.  Once you make a few characters
you know the terrain and can make little circle patters of grabbing,
doing, and turning in quests.  The game on a whole, is simplistic
by nature, but the pvp is outstanding and can get quite intense at
times.  Pick it up and give it a try, I have a 60 Troll Rogue, 47
Undead Mage, 22 Troll priest, 37 Tauren Druid....so i play alot, but
usually at pretty late hours.  Contact me if you want, arestes,
arestees, imofdoom, aresteese, ....notice a trend.  I <3 MMORPG.

by jmgarvin

Squid Information and Beginning Configuration in Webmin

Squid is a proxy tool for Linux. Typically you can edit the
squid.conf file by hand and really take your time. However, Webmin has
created a quick process to setup a proxy. If you want to edit your
squid.conf file it typically lives in /usr/local/squid/etc/squid.conf or in Red Hat variants /etc/squid/squid.conf. However, these tutorials will focus on Webmin.

Intro to Squid

In the squid.conf you'll see some highly informative items:
http_port
This is the port on which squid should listen

https_port
What secure port squid should listen on. You need
to provide one port for each SSL cert. If you are using any squid
version less than 2.5, SSL will not work!

no_cache
You can have a caching or a non-caching proxy. This specifically stops squid from caching cgi stuff.

redirect_program
You can "translate" external URLs into
internal URLs. However you really need to understand text parsing to
deal with this, but we'll get to that later.

http_access
The default access rules to allow or deny http
access to specific IPs. Typically you can get a black list and put in
the deny rules there. You can also add an ACL and choose the deny all.

Squid interface in Webmin

The Ports and Networking link

The Ports and Networking page
provides you with the ability to configure most of the network level
options of Squid. Here we can define what ports Squid operates on, what
IP addresses it uses for client traffic and intercache traffic, and
multicast options.

Proxy port is the option used to set the network port on which Squid operates. By default 3128. This also can be set in the http_port option in squid.conf.

ICP port is the port on
which Squid listens for ICP(Intercache Communication Protocol). ICP
(not Insane Clown Posse) is how caches communicate with each other.
Cache hierarchies can be constructed of multiple caches.

Incoming TCP address is the HTTP socket that squid listens on for clients and other caches.

Outgoing TCP address is the port on which squid sends out packets to clients and other caches.

Incoming UDP address is the port on which squid will listen for ICP packets. You can restrict which caches squid will listen to here.

Outgoing UDP address the port on which squid will send to other ICPs.

The rest should be left a default.

Part 2 should be posted later this week.

by jmgarvin

Ok, so you have read my blog about Transgaming and how they have products called Cedega (CLI) and Point2Play (GUI).

So you simply sign up for $15 at the Transgaming site and download both
or either Cedega/Point2Play.  I'll focus on Point2Play because it
is VERY easy to use.  Just grab the rpm, tar, or deb and install.

So, in general, here is what happens.  Point2Play creates a C:
drive on your Linux box for games to use.  This is the Transgaming
directory created in your home folder.  This is so users can use
Point2Play and install games rather than root. 

Now type Point2Play at the command line.  Point2Play will fire and
will install all the other packages that you need (just check box them
all).  Now you can use Point2Play.  It is pretty
simple.  All you have to do is start Point2Play, click Install,
and go to the install path (find install.exe on the CD).  Now you
just do your thing.

Some notes and issues I've come accross:
1) World of Warcraft has some minor issues.  There is a mouse fix
that you will need.  I'd choose the second one as the first one
will cause crashes.  The first one will crash on some spell
effects.  Transgaming is working on it, but this is the current
workaround:
Two work arounds have been discovered for the mouse selecting issue that has occurred since the World of WarCraft 1.5.1 patch.


1) This workaround may not work on all distros, may prevent other games
(such as Half-Life 2) from running but should not cause a speed
decrease.


open a console/terminal window and run


export WINEPRELOADER_SETVALEGACY="no"


then launch Cedega or Point2Play from the same terminal window.


This would need to be set each time you open a new terminal window to play the game.


2) This workaround should work for all users on all distros but may cause a frame rate drop.


Edit the World of WarCraft configuration file with your favorite text editor:


command line users: /home/USERNAME/.transgaming/config


Point2Play users: /home/USERNAME/.point2play/configuration_profiles/NAME_OF_WOW_CONFIG


Add the following section to the config file:


[AppDefaults\\wow.exe\\memory]


"MemoryLayoutOverride" = "0x10000000"

This change will remain persistent as long as you continue to use
that configuration file for World of WarCraft. This change may need to
be removed for future versions of Cedega.

2) Some of the installs seem to fail, but really don't. 
Don't worry about it.  If you get a strange out of memory error on
the install, you are still good.

3) There is a strange issue with Counter Strike:Source that will
sometimes cause the app to crash.  While not a big deal, it does
happen.

4) If the CD doesn't auto eject, don't press the button more than once
on the CD/DVD drive to eject the CD.  This will cause some strange
issues and you will have to install all over again.

5) Keep the default install path.  Wonky things can happen if you don't.

Ok, so now you have to make sure of a couple of more things. 
1) Make sure you have your video drivers!  I highly suggest getting your video drivers from rpm.livna.org.
If your distro does not support RPMs, than you will probably have to
get them from the vendor (ATI or NVidia).  If you can't install
your video drivers, I'll post a walkthough.
2) GET ALSA SOUND!  OSS is wonky and you will get crackling and
sometimes have sound issues if you have multi-channel sounds.  Not
a huge deal, but it is nice to have a clean sound experience while
fragging. 

So that should get you working with everything.  If you have any issues, post a comment and let's work it out!

by stress junkie

I figured that people who are interested in this post may also be
interested in other news in the area of running Windows applications
on Linux. I recently learned that Codeweavers has announced the
expected September release of Crossover Office 5.0. This version is
supposed to provide support for MS Office 2003. Also, Crossover Office
6.0 is expected to be released later this year. This version is
supposed to have better support for Windows games and DRM.

http://www.codeweavers.com/about/general/press/?id=20050809

Several months ago I purchased MS Office 2003 Student Edition. I was
very disappointed to find that neither Wine nor Crossover Office would
support this product. I'm looking forward to the September release of
Crossover Office 5.0 so that I will (hopefully) be able to finally use
the MS Office software. I don't want to install my MS Office software
on
my W2K machine because I don't want to have to use my W2K machine for
some files and my Linux machine for other files. I receive files that
were created by other people using MS Office. I find that the
FOSS applications do not display them correctly.

Hopefully Crossover Office 5.0 will work properly with MS Office 2003.
This would remove a huge barrier to migrating to Linux for many
businesses.

by jmgarvin

Also the sister product to Transgaming is called AclereX. This is a business class piece of software that will help in most instances.

Check out their datasheet

Crossover Office is a great product, but I feel like MS is causing breaks on purpose.

by styopa

Stress junkie, don't your machines talk to each other? My dual boot machines look for their files in my home directory on the Linux-only machine, whether they're running Windows or Linux (courtesy of NFS and Samba). Now, if I could only get roaming profiles to work properly in XP...

Actually I find OpenOffice.org handles most Microsoft Office files quite happily. The only problems I get are with macros and some multimedia stuff.

by jmgarvin

So, you can't get wireless to work in Linux. No big deal.
All you need is ndiswrapper and the Windows inf file. So let's
get wireless working!


1)
Download ndiswrapper It is 154kb, so it should go pretty quickly. At this point also make sure to get the wireless-tools for your distro


2)
If the wireless-tools for your distro aren't
already installed, install them.  Then use gunzip and tar on the
file. To do this simply type, at the command line, tar -zxpf ndiswrapper


3)
Now change directory into the ndiswrapper directory. cd ndiswrapper[version]


4)
Make sure you are root at this point. If you are not, no big deal, just type su at the command line. Enter the root password and away you go. Now type: make distclean && make && make install.
NOTE: If you get an error it is probably because you
don't have your kernel sources. Just go grab the srpm or whatever
it is that you need and you should be all set.


5)
Now at the command line:
ndiswrapper -i /path/to/inf
ndiswrapper -l
ndiswrapper -m
modprobe ndiswrapper


6)
To make sure everything is right type dmesg. You should get something like wlan0 ndiswrapper device. Now all you have to do to get your card working is follow these steps:

iwconfig wlan0 mode managed
iwconfig wlan0 essid ESSID
------Where ESSID is the SSID of your AP
iwconfig wlan0 key restricted XXXXXXXX ------This is for your
WEP key. Make sure your hex key starts with 0x. If you aren't
using WEP skip this step. WPA and WEP are a little flaky, so be
warned.

ifconfig wlan0 up


dhclient wlan0

Now, your wireless card works in Linux!

by apotheon

It's slightly easier than that with Debian packages. First, type:

# apt-cache search ndiswrapper

Assuming, for instance, that you're using Debian Sarge/3.1 and it's the 11th of September, 2005, you should get the following output:

ndiswrapper-modules-2.6.8-2-386 - Ndiswrapper linux kernel module
ndiswrapper-modules-2.6.8-2-686 - Ndiswrapper linux kernel module
ndiswrapper-modules-2.6.8-2-686-smp - Ndiswrapper linux kernel module
ndiswrapper-modules-2.6.8-2-k7 - Ndiswrapper linux kernel module
ndiswrapper-modules-2.6.8-2-k7-smp - Ndiswrapper linux kernel module
ndiswrapper-source - Source for the ndiswrapper linux kernel module
ndiswrapper-utils - Userspace utilities for ndiswrapper

That being done, and assuming you haven't done anything surprising like install a custom kernel, you should be able to pick the ndiswrapper module package that matches your kernel version. Then, type something like the following, to get both the module package and the wireless tools package installed:

# apt-get install ndiswrapper-modules-2.6.8-2-686 ndiswrapper-utils

Of course, you can split the two package installation into two separate apt-get install commands if you like, but there's little point. In any case, both are now installed. You don't have to use make, you don't have to ensure you have kernel sources, you don't have to worry about whether the fakeroot or checkinstall packages are installed, or any of the other dependency stuff that might rear its ugly head. Sometimes, compiling and installing from source is very smooth and easy, and sometimes it's not, but installing binary packages is pretty much always a no-brainer. Luckily for us Debian users, we have the biggest, most comprehensive binary package archives in existence available to use, a mere apt-get away.

Ahem. Not to intrude on your lesson, or anything.

In any case, once that's done, you load the module ("turn it on") with the modprobe ndiswrapper command and go from there.

by jmgarvin

Ok, so I have yet to post the rest of my squid tutorial. I started to finish fleshing it out, but I just can't get it to feel right. I'm working on making more readable and far more interesting. I'm also working on a generic configuration so you can set it up pretty quickly and get a feel for what it does. So for the time being I'm going to talk about the Linux directory structure. I know this has been done to death, but I feel like I need to post SOMETHING.

So, let's start with a typical image (thank you learnlinux.tsf.org.za):
Linux directory structure image

So what does it all mean?

We have a top level directory:
/ Everything under this top level directory /, is a subdirectory:
bin sbin lib usr var boot dev etc home mnt proc root tmp lost+found opt

/bin
Contains executable programs (commands). Commands like grep, ls, kill, chmod, and chown live here.

/boot
These files are needed so that Linux can boot. Your bootload configuration for grub lives in /boot/grub/grub.conf and your vmlinuz configuration lives here as well.

/dev
This is how we interface with hardware. What this means is to mount a usb drive you can mount it via a hardware mount point.
mkdir /media/usb
mount /dev/sda1 /media/usb

/etc
These are the files that help configure the local machine. Thins like X11 live here. X11 helps to configure XWindows.

/home
This is where the user accounts should have a home directory.

/lib
These are libraries that the system needs for commands like ls. It also has some libs the system will need to boot.

/mnt
This is depricated. /mnt is being replaced by /media

/lost+found
If something is wonky and can't be identified by the system correctly, it is placed here. Typically not too much action here if you are running a dektop.

/opt
Typically for add on software.

/proc
Information about your system and kernel are stored here. Try these commands
# less /proc/cpuinfo
# less /proc/meminfo
# less /proc/version

/root
This is the user root's home directory. This is like bin, but for root. Commands like ifconfig, mkfs, fsck, and iptables lives here.

/tmp
Temporary files live here. This is typically cleaned out a boot time or at scheduled times.

/usr
Installed applications typically live in /usr. User commands, non-vital sytem binaries and various user libraries also live here.

/var
This directory contains spooling data, logs, and some temp files.

I think that pretty much sums up the total structure. I should have the rest of the squid tutorial up as soon as I figure out how to clarify a few things and clean up some of the setup so it is more generic.

by jmgarvin

This is the part of Squid where I talk about setting up black lists and
actually making your proxy useful.  You have a basic idea of what
to do, now you just have to do it!

Let's first look at Cache Options.  What this
does for you, if you are using a caching proxy, is allows you to
determine some basic configuration information.  You can decide on
the directory where the information is cached, the amout of disk space
to use, and how deep you want it to go.

The real power of squid is you can setup Access Control Lists (ACL). 
This is what you really need squid for, blocking/allowing
content!   While you can do similar things with host files,
Squid has more power and in general will ensure that you can control,
pretty granularly, what sites are able to be visited. 

To setup the ACL we need to get into the ACL portion
of Squid in Webmin.  Simply click on Access Control and you are
there.  Let's create a new ACL.  First we need to decide what
type of ACL we need.  I stole this from http://www.swelltech.com/support/webminguide-1.0/ch12.html

Browser Regexp

A regular expression that matches the clients browser type based on the user agent
header. This allows for ACL's to operate based on the browser type in
use, for example, using this ACL type, one could create an ACL for
Netscape users and another for Internet Explorer users. This could then
be used to redirect Netscape users to a Navigator enhanced page, and IE
users to an Explorer enhanced page. Probably not the wisest use of an
administrators time, but does indicate the unmatched flexibility of
Squid. This ACL type correlates to the browser ACL type.

Client IP Address

The IP address of the requesting client, or the clients IP address. This option refers to the src ACL in the Squid configuration file. An IP address and netmask are expected. Address ranges are also accepted.

Client Hostname

Matches against the client domain name. This option correlates to the srcdomain
ACL, and can be either a single domain name, or a list or domain names,
or the path to a file that contains a list of domain names. If a path
to a file, it must be surrounded parentheses. This ACL type can
increase the latency, and decrease throughput significantly on a loaded
cache, as it must perform an address-to-name lookup for each request,
so it is usually preferable to use the Client IP Address type.

Client Hostname Regexp

Matches against the client domain name. This option correlates to the srcdom_regex
ACL, and can be either a single domain name, or a list of domain names,
or a path to a file that contains a list of domain names. If a path to
a file, it must be surrounded parentheses

Date and Time

This type is just what it sounds like, providing a means to create ACLs
that are active during certain times of the day or certain days of the
week. This feature is often used to block some types of content or some
sections of the Internet during business or class hours. Many companies
block pornography, entertainment, sports, and other clearly non-work
related sites during business hours, but then unblock them after hours.
This might improve workplace efficiency in some situations (or it might
just offend the employees). This ACL type allows you to enter days of
the week and a time range, or select all hours of the selected days.
This ACL type is the same as the time ACL type directive.

Dest AS Number

The Destination Autonomous System Number
is the AS number of the server being queried. The autonomous system
number ACL types are generally only used in Cache Peer, or ICP, access
restrictions. Autonomous system numbers are used in organizations that
have multiple Internet links and routers operating under a single
administrative authority using the same gateway protocol.
Routing decisions are then based on knowledge of the AS in addition to
other possible data. If you are unfamiliar with the term autonomous
system, it is usually safe to say you don't need to use ACLs based on
AS. Even if you are familiar with the term, and have a local AS, you
still probably have little use for the AS Number ACL types, unless you
have cache peers in other autonomous systems and need to regulate
access based on that information. This type correlates to the dest_as ACL type.

Source AS Number

The Source Autonomous System Number is another AS related ACL type, and
matches on the AS number of the source of the request. Equates to the src_as ACL type directive.

Ethernet Address

The ethernet or MAC
address of the requesting client. This option only works for clients on
the same local subnet, and only for certain platforms. Linux, Solaris,
and some BSD variants are the supported operating systems for this type
of ACL. This ACL can provide a somewhat secure method of access
control, because MAC addresses are usually harder to spoof than IP
addresses, and you can guarantee that your clients are on the local
network (otherwise no ARP resolution can take place).

External Auth

This ACL type calls an external authenticator process to decide whether
the request will be allowed. Many authenticator helper programs are
available for Squid, including PAM, NCSA, UNIX passwd, SMB, NTLM (only
in Squid 2.4), etc. Note that authentication cannot
work on a transparent proxy or HTTP accelerator. The HTTP protocol does
not provide for two authentication stages (one local and one on remote
Web sites). So in order to use an authenticator, your proxy must
operate as a traditional proxy, where a client will respond
appropriately to a proxy authentication request as well as external Web
server authentication requests. This correlates to the proxy_auth directive.

External Auth Regex

As above, this ACL calls an external authenticator process, but allows
regex pattern or case insensitive matches. This option correlates to
the proxy_auth_regex directive.

Proxy IP Address

The local IP address on which the client connection exists. This allows
ACLs to be constructed that only match one physical network, if
multiple interfaces are present on the proxy, among other things. This
option configures the myip directive.

RFC931 User

The user name as given by an ident daemon running on the client
machine. This requires that ident be running on any client machines to
be authenticated in this way. Ident should not be considered secure
except on private networks where security doesn't matter much. You can
find free ident servers for the following operating systems: Win NT, Win95/Win98, and UNIX. Most UNIX systems, including Linux and BSD distributions, include an ident server.

Request Method

This ACL type matches on the HTTP method in the request headers. This
includes the methods GET, PUT, etc. This corresponds to the method ACL type directive.

URL Path Regex

This ACL matches on the URL path minus any protocol, port, and host
name information. It does not include, for example, the
"http://www.swelltech.com" portion of a request, leaving only the
actual path to the object. This option correlates to the urlpath_regex directive.

URL Port

This ACL matches on the destination port for the request, and configures the port ACL directive.

URL Protocol

This ACL matches on the protocol of the request, such as FTP, HTTP, ICP, etc.

URL Regexp

Matches using a regular expression on the complete URL. This ACL can be
used to provide access control based on parts of the URL or a case
insensitive match of the URL, and much more. The regular expressions
used in Squid are provided by the GNU Regex library which is documented
in the section 7 and 3 regex man pages. Regular expressions are also discussed briefly in a nice article by Guido Socher at LinuxFocus. This option is equivalent to the url_regex ACL type directive.

Web Server Address

This ACL matches based on the destination Web server's IP address.
Squid a single IP, a network IP with netmask, as well as a range of
addresses in the form "192.168.1.1-192.168.1.25". This option
correlates to the dst ACL type directive.

Web Server Hostname

This ACL matches on the host name of the destination Web server.

Web Server Regexp

Matches using a regular expression on the host name of the destination Web server.

Let me just start by saying we typically are goint to use Web Server
Hostname, Web Server Regexp, Web Server Address, URL Protocol, URL
Port, and Client IP Address under the Access Control link.  Let's
examine what we can do.

Web Server Hostname - We can block certain sites with hostnames this way.  For example, we could block microsoft.com using this method.

Web Server Regexp - We can use regular expressions like *, +, and ?. 
If you don't know what these mean, check out the link.  A good way
to block a bulk list of sites.  For example *.yahoo.com or
yahoo.*.com means you block all sites that start with anything before
the .yahoo or after the yahoo. respectivly.

Web Server Address - This is the actual
IP address of the server.  We can block specific IPs or blocks of
IPs.  This is you need to give a range or IPs and the netmask for
this to work.  You need to know a little about how things work, so
it might be easier to use Web Server Hostname or Web Server Regexp,
rather than this.

URL Protocol - This is a good way to bulk block specific traffic.  I suggest blocking FTP or gopher to get a feel for what is happening

URL Port - Here we can lock down what
port(s) we are going to use.  Typically proxies allow very few
connections and usually only have port 21, 22, 80, and 443 open. 
This can change, but you can really lock down what TCP port traffic is
happening.

Client IP Address - We can disallow
specific clients access.  This is handy if we want to allow some
clients more or less access than others.  You need the IP range
and the netmask for this. 

So why Squidguard if we can block all
this with squid?  Well it can keep our blacklist up to date. 
You can grab a squidguard blacklist from Internet-Filter. 
The nice thing about Squidguard is that it really dove tails nicely
with Squid.  If you use Squid as a caching proxy and then plop in
Squidguard you have a pretty good security setup on the
cheap.   Squid can hide what your network looks like and
maintain a decent cache of web pages if you don't have high bandwidth
and squidguard can block the bad pages with a maintained blacklist!

So we have to get the squidguard plugin for webmin.  Simply click:
Webmin -> Webmin Configuration -> Webmin Modules -> From FTP or HTTP URL
and in the box paste this URL: http://www.niemueller.de/webmin/modules/squidguard/squidguard-0.91.2.wbm.gz

Now click Install Module and you'll have
squidguard installed.  First you will need to setup a path to
squidguards configuration files.  You need to go to the path where
you have squidguard install and find the squidguard.conf. 
Typically it is /etc/squid/squidguard.conf.  Now it will start to setup squidguard.  You can now import the blacklist and away you go!

If you have any questions or want more on setting this stuff up, drop a comment.