<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mimor &#187; tip</title>
	<atom:link href="http://mimor.be/tag/tip/feed/" rel="self" type="application/rss+xml" />
	<link>http://mimor.be</link>
	<description>Almost weekend!</description>
	<lastBuildDate>Wed, 18 Jan 2012 10:50:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Tips: GRUB</title>
		<link>http://mimor.be/2009/tips-grub/</link>
		<comments>http://mimor.be/2009/tips-grub/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 22:02:10 +0000</pubDate>
		<dc:creator>Mimor</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[bootloader]]></category>
		<category><![CDATA[Grub]]></category>
		<category><![CDATA[MBR]]></category>

		<guid isPermaLink="false">http://mimor.be/?p=302</guid>
		<description><![CDATA[GRUB is one of the most common used bootloader on linux. So, when using linux, and you&#8217;re a bit interesting in &#8216;what&#8217;s under the hood&#8217;,  it&#8217;s the first thing you want to learn about. When you turn on your computer, the bios will start the bootstrap procedure from the primary boot-device. (If you&#8217;re planning to [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-314" title="Grub" src="http://mimor.be/wp-content/uploads/2009/08/Grub.png" alt="Grub" width="125" height="105" /><acronym title="Grand Unified Bootloader">GRUB</acronym> is one of the most common used <a title="Wikipage to Bootloader" href="http://en.wikipedia.org/wiki/Boot_loader" target="_blank">bootloader</a> on linux.<br />
So, when using linux, and you&#8217;re a bit interesting in &#8216;what&#8217;s under the hood&#8217;,  it&#8217;s the first thing you want to learn about.</p>
<p>When you turn on your computer, the bios will start the bootstrap procedure from the primary boot-device.<br />
(If you&#8217;re planning to run a LiveCD, you might make that your CD/DVD-rom drive) <img src='http://mimor.be/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
A bootstrap is in fact nothing else than having a small program, so that this can load a bigger one.<br />
That&#8217;s the thing GRUB does, in short!<br />
What you should remember, is that it&#8217;s important, and you would not like to break it.<br />
If you do, you&#8217;ll render your hardisk unbootable.</p>
<p>So the first thing you want to do, is back up your MBR!<br />
Why not just GRUB?<br />
The MBR is a 512-byte segment, the first sector, on your harddisk.<br />
GRUB takes 446 bytes, the partition table takes 66 bytes<br />
and the 2 remaining bytes are for a signature.<br />
You might want to keep these 3 intact.</p>
<p><span id="more-302"></span></p>
<p>So before you want to start doing something with it, you might want to make a backup of those first 512 bytes.</p>
<pre>foo@bar:~# dd if=/dev/hda of=/root/hda.mbr bs=512 count=1</pre>
<h4>explanation:<br />
The <strong>dd</strong> command has a primary purpose to low-level copying and conversion of raw data.<br />
The <strong>if=</strong> option can be read as <em>input from</em> and the source.<br />
You might want to change <em>/dev/hda</em> to <em>/dev/hdb</em> or something relevant to your situation.<br />
The <strong>of=</strong> option can be read as <em>output file</em> and is the file where you want to write the output to.<br />
<strong>bs=</strong> sets both input and output block sizes to size bytes.<br />
<strong>count=</strong> copies only n input blocks to the output.</h4>
<h3>Check it out</h3>
<p>Just like any other program in linux, you can look at it&#8217;s configuration by opening a text file.<br />
Open the <strong>/etc/grub/grub.conf</strong> file with your favorite text editor.<br />
If you don&#8217;t have one, use nano.</p>
<pre>foo@bar:~# sudo nano /etc/grub/grub.conf</pre>
<p>This is what mine looks like at this moment:</p>
<pre>default		0
timeout		3

## password ['--md5'] passwd

# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=/dev/mapper/Grubfellow-root ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=e52270f2-fe58-41c3-b20a-01bd057de3ea

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
##      lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
##      indomU=true
##      indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title		Ubuntu 9.04, kernel 2.6.28-14-generic
uuid		e52270f2-fe58-41c3-b20a-01bd057de3ea
kernel		/vmlinuz-2.6.28-14-generic root=/dev/mapper/Grubfellow-root ro quiet splash
initrd		/initrd.img-2.6.28-14-generic
quiet

title		Ubuntu 9.04, kernel 2.6.28-14-generic (recovery mode)
uuid		e52270f2-fe58-41c3-b20a-01bd057de3ea
kernel		/vmlinuz-2.6.28-14-generic root=/dev/mapper/Grubfellow-root ro  single
initrd		/initrd.img-2.6.28-14-generic

title		Ubuntu 9.04, memtest86+
uuid		e52270f2-fe58-41c3-b20a-01bd057de3ea
kernel		/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST</pre>
<p>This will differ from your, as you might run another linux distribution or kernel.</p>
<p>In most modern distro&#8217;s the grub.config file will be updated every time there is a kernel-update.<br />
So remember, if you would ever use an exotic distro or did a kernel-update by hand, you might go check whether the grub.config is changed too.</p>
<p>Most of the modern config files are well documented, if not in the file itself, on the internet.<br />
You can also alter the background color/image and the lay-out of the menu/text.<br />
But i&#8217;ll explain that to you in a next post.</p>
]]></content:encoded>
			<wfw:commentRss>http://mimor.be/2009/tips-grub/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Weird requests on the website</title>
		<link>http://mimor.be/2009/weird-requests-on-the-website/</link>
		<comments>http://mimor.be/2009/weird-requests-on-the-website/#comments</comments>
		<pubDate>Sun, 24 May 2009 15:26:30 +0000</pubDate>
		<dc:creator>Mimor</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Info]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[webdevelopment]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://mimor.be/?p=207</guid>
		<description><![CDATA[I was looking at the stats for mimor.be and I was a bit surprised to see these easy attempts to compromise data from the website. There were several 404 errors returned on files with names such as: /packet.mdb /wwwroot.zip /shop.rar /shop.zip /site.rar /web.rar /web.zip /www.zip /www.rar /tomdb.mdb /shop.mdb /shoes.rar /wwwroot.rar /HSH.mdb /site.zip /HYTop.mdb The fact [...]]]></description>
			<content:encoded><![CDATA[<p>I was looking at the stats for mimor.be and I was a bit surprised to see these easy attempts to compromise data from the website.<br />
There were several 404 errors returned on files with names such as:</p>
<ul>
<li>/packet.mdb</li>
<li>/wwwroot.zip</li>
<li>/shop.rar</li>
<li>/shop.zip</li>
<li>/site.rar</li>
<li>/web.rar</li>
<li>/web.zip</li>
<li>/www.zip</li>
<li>/www.rar</li>
<li>/tomdb.mdb</li>
<li>/shop.mdb</li>
<li>/shoes.rar</li>
<li>/wwwroot.rar</li>
<li>/HSH.mdb</li>
<li>/site.zip</li>
<li>/HYTop.mdb</li>
</ul>
<p><span id="more-207"></span>The fact that some people put effort &amp; time in such web-crawling means that they have results on this.<br />
So folks, plz stop putting database-files &amp; backup-files in your publicly-accessible folders! This is the only remedy against such &#8220;attacks&#8221;.</p>
<p>Whilst I&#8217;m on web-security, let me remind you of some other dangerous things when hosting a website:</p>
<ul>
<li>Use SFTP instead of FTP!  (FTP sends data &amp; passwords unencrypted over the big bad Internet).</li>
<li>Do not use password protected directory&#8217;s on Microsoft IIS servers.</li>
<li>Manage Database and web/ftp users on a strict base. (unused logins should be removed).</li>
<li>Keep an eye on the log-files of the server.</li>
<li>If you don&#8217;t know how to program, first learn it!</li>
<li>Be careful when installing plug-ins/scripts from someone else. First review the code and user comments on it!</li>
<li>Remove unused packages/software/scripts from the server, they might form a major security leak.</li>
<li>Do not put passwords and other personal data on free webhosting spaces.</li>
<li>Be careful what tools you use. Some, such as Filezilla store usernames, passwords and other valuable credentials in an xml file (clear text) in an unencrypted directory.</li>
<li>etc &#8230;</li>
</ul>
<p>These are security issues that are verry common, as most people tend  to think that a safe hosting/code is enough to secure a website.</p>
]]></content:encoded>
			<wfw:commentRss>http://mimor.be/2009/weird-requests-on-the-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

