Boot Loader’a password koymak: Kernel’i koru!

Haziran 17, 2013 § Yorum yok § Kalıcı bağlantı

Bootloader’a password koyalım. Millet kernel’a parametre veremesin!

grub-md5-crypt

1

Bu komutun çıktısını /etc/grub.conf dosyasının içine aşağıdaki satırla yazalım.

password --md5 $1$t8JvC1$8buXiBsfANd79/X3elp9G1

1

Şimdi GRUB menüsünde ‘p’ tuşuna basarak edit moduna geçilebilir.
O aşamada ise password girilmesi gerekmektedir.
1

Bu password korumasını kaldırmak için kurulum CD/DVD’si takılıyken ‘Rescue Installed System’ menüsüne girilerek

chroot /mnt/sysimage
vi /etc/grub.conf ('password' satırını kaldır)
reboot

yapılabilir. Aynı işlem Herhangi bir Live CD ile de yapılabilir.

Live CD saldırısını engellemek için
-BİOS şifresi koy
-BİOS’da boot sırasını önce HDD sonra CD/DVD olarak değiştir.

Linux’ü Hack etmek: Single User Mode olmadan!

Haziran 17, 2013 § Yorum yok § Kalıcı bağlantı

Single user mode kullanımındaki gibi grub menüsünden kernel satırı edit edilir.
kernel satırının sonuna ‘ init=/bin/bash’ yazılır.
1

Bilgisayar açıldıktan sonra ‘passwd’ işe yaramayacak.
1

Bunun sebebi kökün (/) read only mount olması.
Bu sorunu çözmek için kökü remount edelim.

mount -o remount,rw /

Şimdi ‘passwd’ çalışmalı.

1

Linux’ü Hack etmek: Single User Mode!

Haziran 17, 2013 § Yorum yok § Kalıcı bağlantı

1. Yol:

-Grub menüsü beklenir
1

– kernel satırına gelinir ve ‘e’ tuşu ile edit edilir
1

-kernel satırının sonuna ‘ 1’ konulur ve boot için ‘b’ tuşuna basılır
1

Şimdi bilgisayar single user modda açıldı.
‘passwd’ ile root password değiştirilebilir.
Eğer ‘passwd’ de bir sorun olursa SELinux açık demektir.
Önce ‘setenforce 0’ sonra ‘passwd’ kullanılabilir.

Gezi parkı olaylarının başlaması…

Haziran 7, 2013 § Yorum yok § Kalıcı bağlantı

Linux konuşuyor?

Haziran 7, 2013 § Yorum yok § Kalıcı bağlantı

echo 'you are a loser' | festival --tts
for count in $(seq 1 10) ; do espeak "Go Away" ; done

Process ne kadar zamandır çalışıyor?

Haziran 7, 2013 § Yorum yok § Kalıcı bağlantı

ps -p 3064 -o etime

veya

ps -eo pid,args,etime | grep <aranan_pid>

vim referans

Haziran 5, 2013 § Yorum yok § Kalıcı bağlantı

Navigasyon

	
e | end of current word
b | beginning of word
$ | go to end of line
0 | go to beginning of line
( | go to beginning of section (denoted by \n\n)
) | go to end of section (denoted by \n\n)

Search operators:

/ (or ?) | start a search
/\c (or ?\c) | start a case insensitive search
n | next
shift+n | previous

Destructive functions/clipboard operators:

	
u | undo
ctrl+r | redo
v | allow highlighting for copy, cut, etc at cursor
y | copy/yank
d | cut
p | paste
x or del | delete character at cursor
X or backspace (while in INSERT mode) | delete character before cursor

“Big” operations:

	
V | highlight whole line
gg | go to top of file (first line)
G | go to bottom of file (last line)
control+b | page up
control+f | page down
yy | copy/yank line
dd | cut the current line (not delete, but cut to clipboard)

Centos’da ipv6’yı iptal etmek

Haziran 5, 2013 § Yorum yok § Kalıcı bağlantı

Completely disable IPv6 in CentOS6

All of these are fun and good, but none really disables ipv6. You really are concerned with your NICs not being configured for IPv6, but if you really want to disable ipv6… well… disable ipv6:

In /etc/grub.conf edit the kernel lines to include:

	
ipv6.disable=1

The “trick” here, as described by TrevorH1 in #linux, is that programs can still load the module as they wish. You can check this by running lsmod or modprobe -l, you will still see the ipv6.ko kernel module. This allows user mode programs to access the kernel module in their code (so they don’t crash); but as far as the kernel is concerned ipv6.disable=1, so the kernel doesn’t really allow much to get through it.

And that’s it. IPv6 is disabled on your box… but if you want to disable a variety of fun things that you might find when seeking to disable IPv6…

In /etc/sysctl.conf change/create entries:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

In /etc/sysconfig/network change/create entries:

	
NETWORKING_IPV6=no
IPV6INIT=no

In /etc/modprobe.d/blacklist.conf change/create entries:

	
blacklist net-pf-10
blacklist ipv6

Disable iptables for IPv6:

	
service ip6tables stop
chkconfig ip6tables off

Disable ipv6 completely:

echo "install ipv6 /bin/true" > /etc/modprobe.d/ipv6_disabled.conf

Disk bozmanın bazı yolları…

Temmuz 5, 2012 § Yorum yok § Kalıcı bağlantı

Disklerin read/write istekleri ile ısınarak bozulması için

while true; do dd if=/dev/xxx of=/dev/xxx conv=notrunc; done

Diski yavaşlatıp, bilgi yazıp tekrar yavaşlatmak için

hdparm -S 1 /dev/xxx while true; sleep 60; dd if=/dev/random of=foobar count=1; done

Flash drive gibi hareketli parçası olmayan parçaların aşırı kullanım yolu ile bozulması için

dd if=/dev/urandom of=/dev/xxx

vlc’de Türkçe karakterli altyazı sorununa çözüm

Haziran 21, 2012 § Yorum yok § Kalıcı bağlantı

Altyazının karakter seti UTF-8 değilse sorun çıkabiliyor.
Önce bu durumu tesbit edelim:

file --mime input.srt
veya
file --mime-encoding input.srt

Altyazı dosyasının karakter setini değiştirelim

iconv -f ISO-8859-9 -t UTF-8 input.srt > output.srt