2013年12月25日 星期三

postfix mail

*********************************

**********************************************************************************
~/.forward 內容範例
\qna
qna@qna.tw
"| /PATH/TO/YOUR/PIPE/PROGRAME"
這三種方式分別是:
\qna 可以將信件留存一份在 qna 帳號裡;
qna@qna.tw 會把信件轉寄到 qna@qna.tw 這個信箱,當然也可以有其他信箱(等同 maillist 功能);
"| /PATH/TO/YOUR/PIPE/PROGRAME" 則是將信件內容傳給指定的程式來處理。
其中,使用第三種方式時,這個收件帳號本身必須具備有效的 shell 執行能力,否則 sendmail 將會忽略這個動作。
*********************************
mail

未讀信件存放位置
/home/user_directory/Maildir/new/
已讀信件存放位置(設定佈從主機刪信)
/home/user_directory/Maildir/cur/

其他信件匣存放位置
ex:
test
/home/user_directory/Maildir/.test
中文名信匣
/home/user_directory/Maildir/.&?????????

************************************
postfix user quota setup

xfs_quota -x -c 'limit bsoft=15000m  bhard=15100m match' /dev/sdb1
xfs_quota -x -c 'limit bsoft=10000m  bhard=10100m match' /dev/sdb1
xfs_quota -x -c report /dev/sdb1

for example:
xfs_quota -x -c 'limit bsoft=15000m  bhard=15100m ruby05' /dev/sdb1
xfs_quota -x -c report /dev/sdb1

edquota -p sample_user  -u  need_user
**************************************

postfix
讓  xxxx.edu.tw 也可收信

[root@mail ~]# cd /etc/postfix/
[root@mail postfix]# vi main.cf
mydestination = group.mail.xxx.yyy.tw, xxxx.edu.tw,$myhostname, localhost.$mydomain, localhost
:wq
service postfix restart

****************************************************
postfix 過濾 Header
header_checks - Postfix built-in content inspection
#        header_checks = pcre:/etc/postfix/header_checks
#        mime_header_checks = pcre:/etc/postfix/mime_header_checks
#        nested_header_checks = pcre:/etc/postfix/nested_header_checks
#        body_checks = pcre:/etc/postfix/body_checks
#
#        postmap -q "string" pcre:/etc/postfix/filename
#        postmap -q - pcre:/etc/postfix/filename <inputfile


/etc/pstfix
cat header_checks
/^Subject:.*5biQ5oi3/ DISCARD
/^Subject:.*pc6k4Q==/ DISCARD
/^From:.*@163\.com/ DISCARD
/^From:.*@126\.com/ DISCARD
/^To:.*akino@mail\.xxx\.yyy\.tw/ DISCARD

2013年12月10日 星期二

windows command

regedit
regedt32
msconfig
gpedit.msc
netplwiz 使用者帳戶
netsh
net
net user sss *  /add
net user sss *
net localgroup Administrators sss /add
help

*****************
service.msc

******************
server core
sconfig
******************
powershell


update-help
get-help
get-windowsedition -online
Get-Service | Where {$_.Status -eq "Running"}
Get-Service | Where {$_.Status -eq "Running"}|FL  --完整資訊
Get-Service | Where {$_.Status -eq "Running"}|FT  --執行資訊
Get-Service | Where {$_.Status -eq "Running"}|FT -Autosize
Get-WindowsFeature

stop-service Dhcp
start-service Dhcp
restart-service Dhcp
get-service Dhcp
set-service Dhcp -StartupType "Manual"

new-
remove-
rename-
set-
lock-
unlock-
install-



2013年12月9日 星期一

2013年11月26日 星期二

2013年11月7日 星期四

google serach

goole search
intext:c.js
intitle:"index of " etc
inurl:winnt system32
filetype:mdb intitle:index of
site:ntu.edu.tw intext:資訊安全

GHDB(google hacking database)
http://johnny.ihackstuff.com/ghdb/



2013年11月6日 星期三

主機安全掃描工具(scan tool)


SecTools.Org: Top 125 Network Security Tools

http://sectools.org/

Web vulnerability scanners
http://sectools.org/tag/web-scanners/

Conficker 電腦蠕蟲掃描工具(scan tool)

1. MBSA  Microsoft Baseline Security Analyzer
2. McAfee Conficker detection Tool
3. MicroSoft Windows Malicious Software Removal Tool (MSRT)
4. NOD32 ESET Conficker Cleaner

Web 弱點掃描工具
1. Paros : http://www.parosproxy.org
    function: spider + scanner (crawle );類似 Proxy ,between browser and web.
    browser setup -->  proxy setup : localhost port:8080
    usage:
    a.browser 位址: 輸入欲掃描位址
    b. paros : Analyse ==> spider (capture web)
                    Analyse ==> scan all (scan web)


2. Nikto: http://www.cirt.net


reference:
Exploit Database : http://www.exploit-db.com/
Packetstorm         http://packetstormsecurity.com/
Hackerstorm     http://www.hackerstorm.co.uk/index.html

Jail Free Card (滲透測試免責聲明)
Vulnerability Assessment and Penetration Testing Authorization
http://www.counterhack.net/permission_memo.html