http://www.vrlsec.com



hackinthebox
 ::  hitb portal  ::  hitb portal (SSL)  ::  hitb forum (SSL)  ::  hitb security conference  ::  hitb training ::  hitb irc  ::  hitb photos  ::  hitb videos :: 
Who's Online
There are 195 unregistered users and 0 registered users on-line.

You can log-in or register for a user account here.



Main Menu

Top Stories for Today
[420] How to Design a Secure DMZ
[401] German ID cards hacked by the CCC
[356] Malware hosted on Google Code project site
[256] Apple's elephant in the cloud
[228] Russian cops cuff 10 ransomware Trojan suspects
[228] Algerian Hackers Attack Wrong Website
[217] How Google attacks changed the security game
[201] Feds crack phone clone scam that cost Sprint $15m
[197] PSJailbreak code leaked online
[193] US undergrads crash NASA satellite into Arctic
[192] Heartland to pay Discover $5M for 2008 data breach
[191] How Your Cloud Dream Is Becoming a Security Nightmare
[191] Apple's iOS 4.1 ships Sept. 8
[184] Malaysian National Institute of Public Administration suffers cyber attack
[162] DARPA launches insider threat detection effort for military
[144] China demands real names from mobile phone users
[138] VMWare Sees Big Business In Becoming The Internet Operating System
[128] Windows Phone 7: Done

View the Top 50 articles

Top 20 of the Last 2 Weeks

Past Articles
Wednesday, September 01
·Moscow police investigate alleged ransomware gang
·Novell rolls cloud-security service
·More IT managers plan to spend less, survey finds
·Twitter Turns to OAuth for Application Authentication
·Verizon Uses VMware for Enterprise Cloud Service
·Five Things You Need To Know About IPv6
·iPhone 4 with New Antenna Coming Soon?
·Mark Zuckerberg fights to keep life private
·Android Tablet flood is imminent
·Hackers Steal $600,000 from Catholic Diocese
·Pirate Bay secures documentary funding from fans in just 3 days
·Darpa’s Star Hacker Looks to WikiLeak-Proof Pentagon
·Hackers Focus on Misconfigured Networks, Survey Finds
·Australian ban on PS3 hack extended to September 3
·Apple to offer live video stream of Wednesday's keynote
·US finally reforming its high-tech export control system
Tuesday, August 31
·Wikileaks moves servers to an underground nuclear bunker
·Indian e-voting critic released on bail
·Skype might be bought by Cisco
·Commonwealth Bank of Australia security upgrade causes ATM outage
·Google aims to wipe smile off Facebook
·Will Intel's Sandy Bridge pose a threat to discrete GPUs?
·3M to buy security firm Cogent for $943 million
·Microsoft to build giant data center
·Apple still hasn't fixed iPhone 4 proximity sensor bug
·7 skills every IT manager needs to survive the 2010s
·Intel buys wireless chip tech in mobile-phone push
·Hackers Port Android to Nokia Phones
·Old Apple QuickTime code puts IE users in harm's way
·India Could Face Onslaught of Pakistani Hackers, Say Intelligence Officials
 Older articles

A Guide to OpenBSD Custom Kernel Compilation
Posted by L33tdawg on Tuesday, September 18, 2001 - 10:55 PM (Reads: 8190)
Source:



Note: This article first appeared over at http://www.openbsddiary.org and has been republished here with permission from the author.

By:Deekayen

I booted up my new OpenBSD system and one of the first things I did was type top to figure out what was running, how much processor it was taking, and how much memory I had available while the machine was idling. With 24 mb of ram, I had about 4 mb free which I didn't find acceptable. The first thing I did was try to figure out how to cut that down and the answer was to compile my own kernel.



The default kernel in OpenBSD is called GENERIC. There are many references to it all over the official website. I couldn't find the kernel source for OpenBSD anywhere on my system so I found it on the OpenBSD site at:

ftp://ftp.openbsd.org/pub/OpenBSD/2.9/srcsys.tar.gz

I downloaded it to /root (because that's what I was in) and did:

#: tar -xzvf srcsys.tar.gz
#: mv sys /usr/src
#: cd /usr/src/sys/arch/i386/conf
That got me to where I need to configure my new kernel. It's also where the GENERIC kernel configuration file lives. If you want to just practice compiling a kernel and not get deep into configuration, you type:
#: config GENERIC
#: cd ../compile/GENERIC
#: make depend && make
#: mv /bsd /bsd-original
#: cp bsd /
That will compile the same kernel that was installed by default. Note that if you're not running a i686 system, you'll need to edit the GENERIC file first and change the lines at the very top to just have the processer architecture of your system. In my configuration I just have I486_CPU at the top with the others commented out since I only have a 486 to work with.

Once you have the bsd kernel file moved to the root directory, you can reboot with shutdown -r now or simply reboot. The former is a little cleaner so your system can be sure to run any shutdown scripts.

If your system won't boot for some reason with the new kernel, at the boot> prompt, type bsd-original instead of letting it load bsd. That will load the kernel that was in the default installation that you made a copy of before moving in the newly compiled kernel.

I want to set my 486 up as a gateway/router/nat thing and free up a lot of memory on my system, so I decided not to use the GENERIC kernel file. I put together a different configuration that only uses about 8 mb of memory and enables a lot of features needed for routing and filtering traffic on my network. My configuration is at:
TUNED
Put the TUNED file in the same directory as the GENERIC.
#: mv TUNED /usr/src/sys/arch/i386/conf
Then tell the system to use TUNED as the configuration file:
#: cd /usr/src/sys/arch/i386/conf
#: conf TUNED
Then you should get a message. If it's not an error, you're ready to go:
#: cd ../compile/TUNED
#: make depend && make
When that's done, move the kernel to the root directory and reboot:
#: mv /bsd /bsd-original
#: mv bsd /
#: shutdown -r now
If it won't boot the new kernel, don't panic, you saved the old one (if you've done everything this said). When the computer is booting up and just before it spits out the kernel output, at the boot prompt type:
boot> /bsd-original
Of course your mileage may vary. There are more details on booting your backup kernel from O'Reilly.

Then I edited /etc/rc.conf and turned on ipfilter and ipnat. They're about 2/3 of the way down the file. To turn on the encrypted swapping, I edited vm.swapcrypt.enable in /etc/sysctl.conf. While I was in there I turned on net.inet.ipforwarding too to prepare for my network filtering and nat scripts.



1.) Using Secure Protocols - How to setup SSL wrapped POP - madirish
2.) Intranet Security 101 - orange
3.) Revelation 7:11 - biatch0
4.) A Guide to OpenBSD Custom Kernel Compilation - deekayen
5.) streamyx - You want it, but you can't have it, cause we can't do it - L33tdawg
6.) Ogg Vorbis - A brief Look - Yeah

(Printer-friendly page Send this story to someone)

 
Login
 



 


 Log in Problems?
 New User? Sign Up!

HITB eZine Issue 003

Last 15 Postings to HITB Forum

Topics
· All topics
· AMD News (Aug 10, 2010)
· Apple News (Sep 02, 2010)
· Articles (Mar 03, 2009)
· Ask Us (Feb 01, 2003)
· Audio/Video (Sep 01, 2010)
· Encryption (Aug 30, 2010)
· Games (Aug 27, 2010)
· Hardware (Sep 01, 2010)
· HITB News (Aug 19, 2010)
· Industry News (Sep 02, 2010)
· Intel News (Aug 31, 2010)
· Law and Order (Sep 02, 2010)
· Linux (Aug 30, 2010)
· Microsoft (Sep 02, 2010)
· Networking (Sep 01, 2010)
· PDAs (Feb 09, 2007)
· Privacy (Sep 02, 2010)
· Red Hat (Mar 30, 2010)
· Science (Aug 30, 2010)
· Security (Sep 02, 2010)
· Software & Programming (Sep 02, 2010)
· Spam (Sep 01, 2010)
· Technology (Aug 30, 2010)
· Transmeta (Jul 07, 2007)
· Viruses & Malware (Sep 02, 2010)
· Wireless (Aug 26, 2010)

Packet Storm Security Latest
· nullconGoa2011-CFP.txt
The Call For Papers for nullcon Dwitiya 2.0 is now open. It takes place February 25th through the 26th, 2011 in Goa, India.
· amirocmsfaq-xss.txt
Amiro.CMS version 5.8.4.0 suffers from a stored cross site scripting vulnerability.
· advanced-xss.pdf
Whitepaper called Advanced XSS. Written in Arabic.
· moaub01-cpanel.pdf
Month Of Abysssec Undisclosed Bugs - Cpanel suffers from a PHP restriction bypass vulnerability. Versions 11.25 and below are affected.
· moaub01-adobe.pdf
Month Of Abysssec Undisclosed Bugs - Adobe Acrobat Reader and Flash Player suffer from a newclass invalid pointer vulnerability.
· MDVSA-2010-168.txt
Mandriva Linux Security Advisory 2010-168 - Double free vulnerability in the ssl3_get_key_exchange function in the OpenSSL client in OpenSSL 1.0.0a, 0.9.8, 0.9.7, and possibly other versions, when using ECDH, allows context-dependent attackers to cause a denial of service and possibly execute some sources refer to this as a use-after-free issue. The updated packages have been patched to correct this issue.
· ZSL-2010-4961.txt
LEADTOOLS version 16.5.0.2 suffers from buffer overflow, integer overflow and denial of service vulnerabilities related to Active-X Common Dialogs.
· cpanelcp-xss.txt
cPanel Customer Portal suffers from a cross site scripting vulnerability.

Follow us
Join our Facebook Group

Follow us on Twitter

Follow our RSS feed


HITB Affiliates

Page created in 0.816961050034 seconds.