Friday, August 06, 2004

Nice little checklist for FreeBSD

http://www.sddi.net/FBSDSecCheckListaslist.html

This Check list is going to come in handy if I reinstall my FreeBSD system. I have made so many changes over the years and I can use this to add to when I think of something. The below checklist was slightly modified to suit my needs.


FreeBSD Security Checklist as a List

Location of this document: http://www.sddi.net/FBSDSecCheckListaslist.html

Location of the full version: http://www.sddi.net/FBSDSecCheckList.html

Installation
____ separate slices for /(500MB), /tmp(400MB), /usr(33G), /usr/home(2G), /var(400MB), /storage(34G)
____ no inetd.conf, nfs or ntp
____ list ntp servers to use:________________ ________________
____ add /sysutils/rdate-1.0 & /security/chkrootkit-0.36
____ add non-privileged user account in wheel group
Users
____ vipw and remove toor user, rename Charlie&, change shells
____ in /etc/group, and add ssh:*:0:sshusergroup
motd
____ cp /etc/motd /etc/motd.old
____ rm /etc/motd
____ touch /etc/motd
____ vi /etc/motd and create
____ cp /etc/motd /etc/issue
/etc/ssh/sshd_config
____ port 22
____ protocol 2
____ #Hostkey /etc/ssh/ssh_host_key
____ PermitRootLogin no
____ MaxStartups 5:50:10
____ X11Forwarding no
____ PrintLastLog yes
____ SyslogFacility auth
____ LogLevel VERBOSE
____ PasswordAuthentication no
____ Banner /etc/issue
____ AllowGroups sshusers
/etc/ssh/ssh_config
____ ForwardAgent no
____ ForwardX11 no
____ PasswordAuthentication no
____ CheckHostIP yes
____ Protocol 2
DSA Key Generation (as opposed to passwd)
____ su - {nonprivuser} as root
____ ssh-keygen -d
____ accept default /.ssh/id_dsa
____ enter passwords twice
____ cd .ssh
____ cat id_dsa.pub > authorized_keys2
____ copy key to floppy, and confirm
____ delete key from server
rc.conf
____ inetd.conf="NO"
____ syslogd_enable="YES"
____ syslogd_flags="-ss"
____ icmp_drop_redirect="YES"
____ icmp_log_redirect="YES"
____ clear_tmp_enable="YES"
____ portmap_enable="NO"
____ icmp_bmcastecho="NO"
____ fsck_y_enable="YES"
____ update_motd="NO"
____ tcp_drop_synfin="YES"
____ log_in_vain="YES"
login.conf & auth.conf
____ vi /etc/login.conf
____ :passwd_format=blf:____ :passwordtime=52d:____ mixpasswordcase=true:____ :minpasswordlen=9:____ :idletime=32:____ cap_mkdb /etc/login.conf
____ confirm with vipw that password field starts with $2
____ confirm shells for users
____ vi /etc/auth.conf
____ crypt_default=blf
sysctl.conf
____ vi sysctl.conf
____ net.inet.tcp.blackhole=2
____ net.inet.udp.blackhole=1
____ kern.ps_showallprocs=0
fstab
____ vi /etc/fstab
____ /tmp to rw,noexec
____ /usr/home to rw,nosuid,noexec
____ /floppy to rw,noauoto,noexec,nosuid,nodev,noatime
____ /cdrom to ro,noauto
crontab
____ chmod 600 /etc/crontab
____ touch /var/cron/allow and add users who can change cron jobs
____ chmod 600 /var/cron/deny
____ vi /var/cron/deny and add users to disallow
____ add 0 2 * * * root /usr/libexec/locate.updatedb
____ add 0 2 * * * root /usr/local/sbin/rdate {ntpserver}
____ add 1 3 * * * root /usr/local/sbin/chkrootkit
Kernel Changes /usr/src/sys/i386/conf/{kernelname}
____ #pseudo-device bpf
____ options SC_NO_HISTORY
____ options SC_DISABLE_REBOOT
____ options SC_DISABLE_DDBKEY
____ options TCP_DROP_SYNFIN
____ options RANDOM_IP_ID
____ options ICMP_BANDLIM
____ confirm settings in /usr/src/sys/i386/conf/LINT
____ rebuild kernel and reboot
File Permissions
____ chmod 700 /root
____ chmod 600 /etc/syslog.conf
____ chmod 600 /etc/rc.conf
____ chmod 600 /etc/newsyslog.conf
____ chmod 600 /etc/hosts.allow
____ chmod 600 on /etc/login.conf
____ chmod 700 /usr/home/*
Network Time Protocol
____ vi /etc/ntp.conf
____ restrict default ignore
TCP Wrappers
vi /etc/hosts.allow
____ sshd : localhost : allow
____ sshd : x.x.x.x, x.x.x.x : allow
____ sshd : all : deny
____ ftpd : ALL : deny and so on for unused services
Console Access
____ vi /etc/ttys
____ first line: console none unknown off insecure
____ on insecure for each tty
Bash Shell
____ vi /usr/share/skel/.bash_logout
____ clear
chflags
____ list files to sappnd & schg
Clean-up
____ sockstat -4
____ tcpdump -xX

Sguil Installation Guide v 0.5.0_03

Richard Bejtlich just updated the Sguil Installation Guide. I have been telling myself to read this, but haven't yet gotten to it. I am determined to read it within the next week and try out Sguil on my box. The URL: http://sguil.sourceforge.net/sguil_guide_latest.txt

Those Damn Gaps!!!

I finally was able to get those gaps inbetween my images out! It took me three days... looking over my CSS as if I was a mad man... I mean, I looked and was sure there was nothing wrong with my code. I checked google, but but nothing. I was luck to stumble across a site which solved my problem. I don't have the URL off hand, but the site pretty much mentoned how IE works in quirks mode when XML 1.0 is used in a site. Well, my problem was I was outting XML with XHTML. Don't ask me out this messed up the images, but it did. I commented out the XML and it worked!! Boy, was I releaved.

Tuesday, August 03, 2004

There is life with CSS after all....

The reading was worth it. I was able to put together over 10 sliced images using only CSS positioning and passed XHTML Transitonal with ease. I must say, there is still a lot I have to learn. It really helps to try it out. All the reading was good, but I really understood most aspects better by trying them out.

Sunday, August 01, 2004

Images, Tables, and Mysterious Gaps

Article
Images, Tables, and Mysterious Gaps
Eric A. Meyer, Netscape Communications
Published 04 Mar 2002 (Feedback)
Revised 21 Mar 2003
url: http://devedge.netscape.com/viewsource/2002/img-table/

My Personal Notes (Information I found useful):


Block-Level Attribute:
Causes boxes to be stacked on top of each other instead of side-by-side.

Block-level and Inline Elements

Block level elements add line breaks before and after themselves. Here are some Block-level HTML tags:


  • <address>

  • <blockquote>

  • <br>

  • <div>

  • <fieldset>

  • <h1><h6>


  • <hr>

  • <legend>

  • <p>

  • <pre>

  • <ul>, <ol>, <li>, <dl> and <dd>




Inline Elements are the opposite and do not add line breaks before and after tags.