230 likes | 406 Views
SIP Authentication. Speaker : Shin-Fu, Huang Date : 2008/11/27. Outline. SIP Authentication FreeBSD Password System One-Time Passwords OPIE(One-time Passwords In Everything) Reference. Outline. SIP Authentication FreeBSD Password System One-Time Passwords
E N D
SIP Authentication Speaker:Shin-Fu, Huang Date:2008/11/27
Outline • SIP Authentication • FreeBSD Password System • One-Time Passwords • OPIE(One-time Passwords In Everything) • Reference
Outline • SIP Authentication • FreeBSD Password System • One-Time Passwords • OPIE(One-time Passwords In Everything) • Reference
SIP Authentication User Agent Proxy Server (1) Register (2) 401 Unauthorized ( nonce ) (3) Register ( response ) (4) 200 OK
Authentication Scheme • For the "MD5" algorithms H(data) = MD5(data) • Request-digest = H( H(A1) ":"nonce-value ":" H(A2) ) • A1 is: A1 = username-value":" realm-value ":" passwd where passwd = < user's password > • A2 = Method ":" request-uri
以 x-lite實證 • (1)User Agent 向 Proxy Server 送出註冊訊息。
以 x-lite實證(cont.) #使用者端 Username -value=xinfu Passwd-value =xinfu #Proxy端 Realm-value = ms11.voip.edu.tw Nonce-value = 48db04ca9182a3e1a3b08e025e3771c729e2ff3b A1=xinfu:ms11.voip.edu.tw:xinfu A2 = REGISTER:sip:ms11.voip.edu.tw H(A1) = b2bc8ec65be5d6ca1483dec219811de3 H(A2) = 4a0ac47579d7bff66cda555ff6317738 Request-digest = H( H(A1) : nonce-value : H(A2) ) ##Response =3e800eeabed5d5491c8c74ec4ad6929a • (2)Proxy Server 向 User Agent 送出要求認證訊息。
以 x-lite實證(cont.) • (3)User Agent 經MD5計算得到結果之後,向 Proxy Server 送出夾帶計算結果的訊息。
以 x-lite實證(cont.) • (4)Proxy Server 向 User Agent 送出認證成功的訊息。
Outline • SIP Authentication • FreeBSD Password System • One-Time Passwords • OPIE(One-time Passwords In Everything) • Reference
FreeBSD Password System • “one-way hash” • MD5->$1$ • DES(Data Encryption Standard) • By default FreeBSD uses MD5 to encrypt passwords. • more/etc/login.conf
FreeBSD Password System(cont.) • /etc/master.passwd (vipw) • /etc/passwd
FreeBSD Password System(cont.) • 檔案權限。 • /etc/master.passwd • /etc/passwd
Outline • SIP Authentication • FreeBSD Password System • One-Time Passwords • OPIE(One-time Passwords In Everything) • Reference
One-Time Passwords • 登入密碼每次都不同。 • OPIE (One-time Passwords In Everything), which uses the MD5 hash.
Outline • SIP Authentication • FreeBSD Password System • One-Time Passwords • OPIE(One-time Passwords In Everything) • Reference
OPIE • 帳號使用OPIE。(預設是產生499組密碼) • 產生1000組一次性密碼 opiepasswd -f -c -n 1000
OPIE(cont.) • 查詢單一組密碼。 • 查詢多組密碼。
OPIE(cont.) • 登入帳號時顯示一組challenge。 • 登入成功,下次登入密碼組就會減一。
OPIE(cont.) • /etc/opieaccess • 後門檔案設定,可直接使用系統密碼登入。 • 或是使用OPIE密碼組登入。
Outline • SIP Authentication • FreeBSD Password System • One-Time Passwords • OPIE(One-time Passwords In Everything) • Reference
Reference • [1]. DES, MD5, and Crypt http://www.freebsd.org/doc/zh_TW/books/handbook/crypt.html • [2].One-time Passwords http://www.freebsd.org/doc/zh_TW/books/handbook/one-time-passwords.html • [3].RFC3261 -Section 22. Usage of HTTP Authentication • [4].RFC 2617 - HTTP Authentication: Basic and Digest Access Authentication
報告完畢 ~敬請指教~