1. 程式人生 > >理解ipsec身份標識和認證選項

理解ipsec身份標識和認證選項

This article is part of the Identity and Access Management Security School lesson on VPNs and remote access. Visit the VPNs and remote access lesson page for more learning resources.

IPsec VPNs extend a network's security perimeter by connecting individual hosts or entire networks. A secure VPN starts with verifying the identity of those tunnel endpoints, but poor authentication choices can cause interoperability issues or network compromise. This tip explores common IPsec VPN identity and authentication options, and their security and deployment implications.

Standard IPsec VPN features

IPsec VPN tunnels can be configured statically ("nailed up") or established dynamically using messages defined by the Internet Key Exchange (IKE) standard. IKE lets two VPN gateways (or two VPN hosts, or a gateway and host) authenticate each other, negotiate security parameters, and generate keys for data encryption and integrity.

Authentication is critical to avoid establishing tunnels with unauthorized parties. In a site-to-site VPN, it lets us spot an attacker masquerading as a peer VPN gateway. In a remote access VPN, it lets us deny access to intruders who pose as legitimate users. To enable authentication, IKE peers identify themselves using standard Identity Types: an

IPv4 or IPv6 address, a hostname (Fully Qualified Domain Name, FQDN ), an email address (User FQDN) or an X.500 Distinguished Name (DN). IKE peers can use different ID Types; for example, [email protected] (User FQDN) can tunnel into vpn.mycorp.com (FQDN).

To defeat ID spoofing, we require proof of claim using an IKE standard Authentication Method: a Pre-Shared Key (PSK), an RSA or DSS digital signature , or an encrypted public key . To use PSKs, the same secret value must be configured into both peers before they can authenticate each other. To use digital signatures, each peer must be issued a certificate by a Certificate Authority (CA) that the other trusts. To use encrypted public keys, each peer must generate its own RSA key pair, and then configure its public key into every IKE peer with whom it plans to communicate. IKE peers must use the same Authentication Method; for example, [email protected] and vpn.mycorp.com might both use the shared PSK "opensesame." Or they might both use RSA signatures, each generated with the sender's own certificate.

Because these messages cross untrusted networks where eavesdropping may occur, IKE uses cryptography to protect credentials. For example, IKE PSKs are never transmitted; peers just exchange signed hashes that prove they known the same PSK. But the same cannot be said for IKE IDs. IKE operates in two modes: a 5-message Main Mode that prevents ID sniffing, or a 3-message Aggressive Mode that sends the initiator's ID "in the clear." Both Modes support any IKE standard ID Type and Authentication Method, with one exception: if Main Mode is used with PSK, the ID must be an IP address. This makes Main Mode/PSK impractical for remote access VPNs, because mobile users rarely connect from static IP addresses.

Facilitating remote access

The mutual authentication methods supported by IKE are a good fit for site-to-site VPNs, but IKE does not support asymmetric user authentication methods like passwords, challenge/response exchanges and two-factor tokens, which are commonly used for remote access. To overcome this, many vendors implement non-standard enhancements like Extended Authentication (XAUTH ).

XAUTH is an Internet Draft that supports asymmetric authentication by inserting a new message exchange after Main/Aggressive Mode (IKE Phase 1) and before IPsec parameter negotiation (IKE Phase 2). VPN gateways that use XAUTH can prompt remote users for a secondary login. If user login succeeds, IPsec setup continues; otherwise, setup is abandoned. XAUTH -- and an improvement called Hybrid -- are widely implemented by VPN concentrators and clients to enable user authentication with "legacy" credentials like Windows logins or SecurID tokens.

Although many vendors implement the same XAUTH draft, this extension was not approved as an Internet standard because it is vulnerable to man-in-the-middle attacks . In particular, using weak credentials to complete IKE Phase 1 makes it too easy for an attacker to masquerade as a VPN gateway, prompting other users for their credentials. To reduce this risk, the XAUTH draft strongly discourages using IKE with the same (group) PSK for all users. Unfortunately, many remote access VPNs are configured in precisely this manner! To learn more, consult the XAUTH draft and these references:

Another legacy user authentication option is to run the Layer 2 Tunneling Protocol (L2TP ) over IPsec. This approach was originally used by the VPN client built into Windows 2000/XP, and is now also supported by many other VPN vendors. L2TP authentication occurs after IPsec is completely established.

Selecting an authentication mode for your IPsec VPN

Given this collection of ID Types and standard/extended Authentication Methods, how can you make the best choices for your own VPN? There are many factors to consider, including the number and type of endpoints involved, existing credentials and authentication databases (if any), interoperability needs, corporate security policies, and risk tolerance.

PSKs are the easiest VPN credentials to generate -- and the easiest to compromise. PSKs, like passwords, are vulnerable to social engineering, and valid ID and PSK values are easy to share with those who should not have them. PSKs that are too short or simple are relatively easy to guess, and tools like ikecrack can automate this attack. Clearly, authenticating every user with the same PSK is a high-risk scenario. Authenticating a single gateway pair with a very long, random PSK known only to one admin presents less risk. If you must use PSKs, avoid disclosing associated IDs with Aggressive Mode.

Raw public keys are not hard to generate and configure into a small set of endpoints, like a site-to-site VPN of modest size. The security afforded by encrypted public keys is far stronger than PSKs, but this method doesn't scale well and can pose interoperability problems in multi-vendor VPNs. In fact, RFC 4109 downgraded this method from "SHOULD" to "MAY" implement due to its lack of deployment.

Digital signatures use certificates to bind a subject's identity to its public key, vouched for by a trusted CA. This strengthens security without requiring every endpoint to be configured with every other endpoint's public key. Instead, endpoints need only be configured with one CA's certificate. RSA signatures are widely supported by VPN products; DSS is less common. Digital signatures scale well in companies that already have a Public Key Infrastructure. However, companies without an established platform for issuing certificates -- especially to remote users -- may consider this method too costly. Some VPN products have a built-in CA (or offer an online CA service) to make certificate management easier.

Even companies that bite the bullet and issue certificates to VPN gateways can be reluctant to part with legacy user authentication. As we have explained, there are cases where XAUTH poses high risk and cannot be recommended. However, there are ways to reduce XAUTH's man-in-the-middle risk while leveraging the added value of two-factor user authentication. For example, use IKE Main Mode with Certificates, issuing unique certificates to each VPN gateway, and a group certificate to your users. Follow this with SecurID authentication to verify individual user identity. This combo deters VPN gateway spoofing and PSK cracking, without requiring per-user certificate management. L2TP-over-IPsec is another option, if supported by your VPN Gateway and all clients.

ID Type depends on endpoint type, IKE Mode and Authentication Mode. VPN gateways often use IP address or (for more flexibility) FQDN. VPN hosts often use User FQDN, except for Main Mode/PSK, which requires the initiator's IP address. Depending on the product, remote access VPNs with a group PSK may treat a range of IP addresses as one ID, or use a group ID (FQDN) in Aggressive Mode. X.500 DNs are typically used only with Digital Certificate authentication. Alternatively, an IP address, hostname or email address can be included in a certificate's altSubjectName attribute.

On the horizon: IKEv2

After completing the original IKE standard, the IETF began work on a major revision that was published as RFC 4306 in December 2005. This new standard, IKEv2 , is not interoperable with IKEv1. IKEv2 is a new, streamlined key management protocol for use with IPsec. IKEv2 supports similar-but-different peer authentication options, with built-in support for asymmetric user authentication through the Extensible Authentication Protocol (EAP). ICSA Labs is now accepting applications for VPN products that wish to be tested for IKEv2 certification. Any company kicking off a new IPsec VPN from scratch should take a close look at IKEv2 vendor support and deployment timeframe. Those with deployed VPNs should keep an eye on IKEv2 progress and consider the business benefits of future migration. In any case, consider your authentication options carefully to make best use of today's mature, widely-deployed IKEv1 products.

About the author
Lisa Phifer owns Core Competence Inc., a consulting firm specializing in network security and management technology. Lisa has been involved in the design, implementation and evaluation of data communications, internetworking, security and network management products for over 20 years. At Core Competence, she has advised large and small companies regarding security needs, product assessment and the use of emerging technologies and best practices. Before joining Core Competence, Lisa was a Member of Technical Staff at Bell Communications Research where she won a president's award for her work on ATM Network Management.

相關推薦

理解ipsec身份標識認證選項

This article is part of the Identity and Access Management Security School lesson on VPNs and remote access. Visit the VPNs and remote ac

關於IPv4首部標識片偏移的一點理解

關於IPv4首部標識和片偏移的一點理解 最近在看《圖解TCP/IP》這本書,看到IPv4首部欄位時,對於首部欄位中標識和片偏移的概念有的摸不著頭腦,後來自己在網上查閱了一些資料,也看了很多部落格,目前有一個淺顯的認識。 首先IP包最大的長度為65535(216)位元組,但是傳輸訊號的資料

徹徹底底理解C++中指針引用的區別

c++ 區別 include 分享 sin style void png alt #include<iostream> using namespace std; void test(int **p) {   int a=2;   *p=&a;   

C#—Dev XtraTabControl動態增加Tab關閉選項卡方法

按鈕 屬性 bool new express controls dispose lean 選中 C#—Dev XtraTabControl動態增加Tab和關閉選項卡方法,有需要的朋友可以參考下。 記錄一下以免以後忘了 添加using DevExpress.XtraTab;

全面理解Unity加載內存管理

lar renderer ring 特殊 itl 內存占用 object click iat Unity裏有兩種動態加載機制:一是Resources.Load,一是通過AssetBundle,其實兩者本質上我理解沒有什麽區別。Resources.Load就是從一個缺省打進程

HTML5 開發APP(頭部底部選項卡)

技術 開發 方法 eat 激活 default 底部 top doc 我們開發app有一定固定的樣式,比如頭部和底部選項卡部分就是公共部分就比如我在做的app進來的主頁面就像圖片顯示的那樣 我們該怎麽實現呢,實現我們應該建一個主頁面index.html,然後建五個子頁面

[DotNet]深入理解C#的裝箱拆箱

csharp 簡單 部分 nbsp pre 需要 避免 兩個 value 裝箱和拆箱是值類型和引用類型之間相互轉換是要執行的操作。 1. 裝箱在值類型向引用類型轉換時發生 2. 拆箱在引用類型向值類型轉換時發生 光上述兩句話不難理解,但是往深處了解,就需要一些篇幅來

Flex中TabNavigator隱藏顯示選項

pro ble 點擊 plain bat summer microsoft _id lai 1、問題背景 遇到這樣一個問題:有四個Tab選項卡。依據不同的參數隱藏和顯示選項卡 2、實現實例 (1)隱藏“春季” protected fun

java String長度與varchar長度匹配理解(字符字節長度理解

轉化 筆記 指定 是我 有一個 ati 法語 itl 情況 java String長度與varchar長度匹配理解(字符和字節長度理解) string中的length()長度,返回的是char的數量,每個char可以存儲世界上任何類型的文字和字符,一個char 而

一張圖理解prototype、protoconstructor的三角關系

== fun func 作用 foo 功能 關於 const mage 前面的話   javascript裏的關系又多又亂。作用域鏈是一種單向的鏈式關系,還算簡單清晰;this機制的調用關系,稍微有些復雜;而關於原型,則是prototype、proto和constructo

[PY3]——一個例子理解多線程daemon

div height 對話 block true nbsp for 守護進程 art 理解 (今天糾結已久,多謝junqi大大幫助理解,一語總結便解心頭疑惑)(下面幾點總結基本就是我們的對話) 1. 進程就相當於一個機器,多進程就相當於有多個機器在同時運行,多線程是

前端模塊化的一些理解-commonJs、AMDCMD

() urn fig comm tor 實現 ports ont 相對 ---恢復內容開始--- 前端模塊化規範有三種:CommonJs\AMD\CMD CommonJs 用於服務器端 AMD 用於瀏覽器環境,是RequireJS在推廣過程中對模塊定義的規範化產出

理解消息,主題服務

信息 多對多 需要 消息 構建 發布 是否 如果 發布消息 消息就是通信的數據類型,也就是具體的通信數據. 主題用於多對多的形式,且是單向發送.節點A,B,C...發布消息到主題上(廣播),節點a,b,c...在主題上搜索並接收自己需要的信息,所以通信雙方並不知道彼此的存

【轉】編寫高質量代碼改善C#程序的157個建議——建議28:理解延遲求值主動求值之間的區別

ons ati rgs 理解 問題 效率 sele 而不是 reac 建議28:理解延遲求值和主動求值之間的區別 要理解延遲求值(lazy evaluation)和主動求值(eager evaluation),先看個例子: List<in

理解JS異步單線程

tlist 繼續 script log 需要 情況下 .json 不同 同時存在 什麽是異步? JS的執行環境是單線程,一定時間內只能執行一項任務,不能執行多項任務,為了要執行的代碼,就有一個javascript任務隊列。基於這一概念,JS執行任務時分為兩種模式:同步和異步

理解 CSS 布局塊級格式上下文

可能 沒有 line stand 阻止 支持 第一個 聲明 ash 前言 BFC 的概念始於 CSS2,是個蠻古老的 CSS 話題了,網上也到處能搜到 BFC 的介紹,但是都不夠簡潔。本文系翻譯自 Rachel Andrew 女士的博文 Understanding CSS

Android開發之深入理解泛型extendssuper的區別

我想 lis dataset 文檔 cnblogs extend 擦除 選擇 提前 摘要: 什麽是泛型?什麽是擦除邊界?什麽是上界限定或下界限定(子類型限定或超類型限定)?什麽是類型安全?泛型extends關和super關鍵字結合通配符?使用的區別,兩種泛型在實際Andro

全面理解java自動裝箱拆箱(轉)

sam eva android 之間 對象類型 output 壓力 有一個 sla 自動裝箱和拆箱從Java 1.5開始引入,目的是將原始類型值轉自動地轉換成對應的對象。自動裝箱與拆箱的機制可以讓我們在Java的變量賦值或者是方法調用等情況下使用原始類型或者對象類型更

深入理解Atomic原子操作volatile非原子性

log tile 修飾 深入 clas 同時 結果 一個 body 原子操作可以理解為: 一個數,很多線程去同時修改它,不加sync同步鎖,就可以保證修改結果是正確的 Atomic正是采用了CAS算法,所以可以在多線程環境下安全地操作對象。 volatile是Java的關鍵

Linux的加密認證

Linux文件加密 加密算法 CA認證 子CA搭建 一、加密的重要性 數據日益成為我們個人生活、經濟發展和安全保障的核心。這就意味著,我們必須做到時刻保障數據的安全。這就如同在現實世界中緊鎖家門、限制重要物品的進出,以及保護我們重要的企業財產一樣,我們有賴於加密來保證數據不會遭受各種網絡犯罪的