2013-07-17

Android 系統暗藏美國稜鏡計畫 PRISM 的監控後門?

Android 系統暗藏美國稜鏡計畫 PRISM 的監控後門?


Google 號稱開放原始碼的 Android 系統中,其實也同樣為 NSA 撰寫了專用的程式碼在 Android 所有版本中,Google 發言人 Gina Scigliano 也證實了此事,不過她卻也表示由於 Google 是一個開放原始碼的系統,因此任何人都可為其附加程式碼,因此 Google 無法評論此事。

雖然 Android 是一個開放的系統,不過 Google 的確也把 NSA 的程式碼整合進 Android 中,而且是從 2011 年釋出到之後的版本都包含這個程式碼,也就是無論是三星、HTC 還是 SONY 的 Android 裝置都包含這些程式。

NSA 發言人 Vanee Vines 在聲明中稱,幾乎所有搭載 Android 的手機、平板電話以及其他設備,都含有 NSA 所編寫的代碼。但是 Vines 並沒有說明整合進 Android 中的程式碼,是否就是美國監聽計畫 PRISM(稜鏡計畫)的一部分。

美國國家安全局 (NSA) 官方說明

相關參考資料與報導
Google 在 Android 也暗藏供美國政府後門?

Android 系統被指植入 PRISM 監控,Samsung、HTC、Sony 也不例外

Why you shouldn't worry that the NSA is inside Android's code

Security Enhancements for Android

Yes, the NSA contributed code to Android. No, you don’t have to freak out about it

原文出處:androidauthority
轉載自《網路攻防戰》、不及格網管

How to Install VPN on Windows Server 2012

How to Install VPN on Windows Server 2012



This post should show you how to install a VPN Server on Windows Server 2012. This post covers a VPN server for a small environment or for a hosted server scenario. This post is note made for enterprise deployments. If you want to run a VPN solution in your enterprise you should definitely look at Direct Access which is much easier to deploy in Windows Server 2012 than in Windows Server 2008 R2.

For a VPN server on Windows Server 2008 R2 check this post: How to Install VPN on Windows Server 2008 R2

1. Install the role “Remote Access” via Server Manager or PowerShell


2. Select the DirectAccess and VPN (RAS) role services


3. The other selection in the wizard can use the default properties.


4. After the features are installed you can us the Getting Started Wizard to configure the VPN scenario.



5. If you don’t deploy DirectAccess choose Deploy VPN only.


6. This will open the Routing and Remote Access MMC. Right click on your server and choose Configure and Enable Routing and Remote Access.


7. This launches the Routing and Remote Access Server Setup Wizard


8. If you have just a single network interface in your server choose Custom configuration


9. Select VPN access


10. And click finish and start service


11. Now open the following ports on your firewall and forward them to your Windows Server
For PPTP: 1723 TCP and Protocol 47 GRE (also known as PPTP Pass-through
For L2TP over IPSEC: 1701 TCP and 500 UDP
For SSTP: 443 TCP

12. Users have to be enabled for Remote Access. On a standalone server this can be done in the Computer Management MMC, in a domain environment this can be done in the user properties of an Active Directory user.


Optional: If you don’t have a DHCP Server in your local network you have to add a static address pool. This can could be if you use a single server hosted by a hosting provider.

1. Right click on your Remote Access Server and open properties


2. Click on the IPv4 tab and select “Static address pool”


3. Now add a IP address pool for example 192.168.1.100 – 192.168.1.200

4. Now if this is a standalone server which has only a single Public IP address, add a secondary IP address to the server network interface which is in the same subnet as the IP address pool.

How to Set up  VPN Server on Windows Server 2012 (YouTube)






How to Install VPN on Windows Server 2008 R2

How to Install VPN on Windows Server 2008 R2


This HowTo should show you how to install a VPN Server on Windows Server 2008 R2. This is a HowTo for a small environment or a stand-alone hosted Server.

1. Install the Role “Network Policy and Access Services” with the Server Manager



2. Select the Role Services “Routing and Remote Access Services”



3. Configure and Enable Routing and Remote Access in the Server Manager.



4. Choose “Custom Configuration” if you just have one Network Interface in the Server


5. Choose “VPN access”


6. Finish and click next



7. Allow access for users “Network Access Permission”. You can set that in de Dial-In Tab under the User Premission.


8. Open Ports in your Firewall
For PPTP: 1723 TCP 47 GRE
For L2TP over IPSEC: 1701 TCP 500 UDP
For  SSTP: 443 TCP

Optional: If you don’t have a DHCP Server in your local network you have to add a static address pool. This could be if you have a stand-alone Server by your provider.

1. Right click on “Routing and Remote Access” and open Properties

Add Static address pool

2. Click on the IPv4 Tab and check “Static address pool”

Add Static address pool

3. Add a static address pool of private IP addresses


4. Add secondary IP Address to the Server network interface which is in the same subnet as this pool.

see also

保護網頁應用程式不受駭 深化控管但簡化操作 WAF抵抗新型態攻擊行為

深化控管但簡化操作 WAF抵抗新型態攻擊行為


網頁應用程式可說是由外而內的攻擊管道之一,欲防範諸如SQL資料隱碼(SQL Injection)、跨網站指令碼(Cross-Site Scripting)等攻擊行為,大多會在網頁伺服器的前方建置WAF(Web Application Firewall,網頁應用程式防火牆)來抵擋。如今面對駭客組織化、商業化後,促使攻擊手法隨時都在進步,WAF更必須與時俱進,因應攻擊手法的變化,來進行辨識與攔阻。

判斷攔阻惡意存取

就基本可阻擋的攻擊型態來看,業界大多是參考對應OWASP(Open Web Application Security Project)組織公佈的十大資安威脅類型而設計,如今可說已是WAF設備最基本該具備的功能。F5台灣區技術經理林志斌指出,因此WAF現在發展較著重的是新型態攻擊的應變能力,例如DDoS(分散式阻斷服務),或是後端的網頁伺服器出現漏洞時,要有很快速的方法去應變,像是直接在設備上設定Policy,或利用內建於WAF平台的腳本語言如iRule來撰寫Script,就可以阻擋這些以往不曾出現過的攻擊,讓後端的應用程式得以持續提供服務。

WAF所解析的標的主要是都透過HTTP通訊協定傳輸的內容,也就是必須要懂得HTML、JavaScript、AJAX等語言,才能判斷欄位、字串等參數值,進而作管控,或判斷存取行為是否為惡意攻擊,但其實要區別正常與異常行為並不容易。

A10 Networks台灣區技術總監簡偉傑即舉例,有些企業會申請多條ADSL線路來加大頻寬,透過一台Multi-Link設備來做頻寬整合,認為既經濟又實惠,但連結出去所帶的IP位址,可能每次都不同。對提供服務的網頁伺服器而言,遠端進來的同一個用戶雖然HTTP的Session ID都一樣,但是卻有好幾個不同的來源IP位址;若網頁伺服器僅提供訊息發佈,還可選擇忽略IP位置的判斷,只要Session ID都一樣即屬於正常存取,不至於造成困擾,但同樣狀況若發生在訂票系統就不同了。 因為訂票系統網頁有提供金錢交易,自然要記錄使用者端的環境資訊,不僅要檢查來源IP的變化,甚至每項資訊都要經過比對檢查。但實際上若動輒判斷為異常,恐怕過於嚴謹,可能會接收到許多使用者的抱怨;相對地,若一律判斷為正常,又有可能是一波攻擊行為的前哨,會升高資安風險。諸如此類的模糊地帶,只是其中一個很小的細節,若皆能經由WAF來輔助作正確的判斷,才是導入此解決方案價值所在。

細緻控管網頁應用

近年來台灣對資安的關注升高,再加上法規效應,因此WAF可說日漸受到重視。就F5 BIG-IP Application Security Manager來看,若遇到新型態攻擊事件發生,會有的作法,除了透過本身內建的防禦機制直接抵擋,亦可進一步針對每一個對Web的Request塞入一個特徵碼,也就是運用Cookie的機制來作反向檢查確認,若取得用戶端的資訊沒有記錄操作相關內容,則多半為機器人程式發動的連線,即可判斷為異常,自動攔阻此存取行為,並且將記錄結合統計報表,讓管理者了解網路攻擊行為。

▲不同技術層應有其相對應防護機制。(資料來源:F5)

至於網頁伺服器連線到後端資料庫的資料傳遞,亦可藉由WAF從應用程式端進行防護,例如網頁執行程式中有一段SQL陳述式需連結到資料庫執行,通常此管道也是SQL Injection的入侵方式,一旦經過WAF立即可被辨識與阻擋。即使是正常的SQL Query行為,若資料庫所回應的資料缺乏保護機制,WAF亦可協助補強,例如針對敏感性較高的特定欄位與字串,以遮罩(Data Masking)的方式來處理。

其實WAF經過這幾年發展,控管可說更加細緻也較貼近企業應用環境,遮罩功能就是其一。常見實作的方式是在應用程式開發時就已加入此機制,但若是遇到更早期開發的程式碼,當初還沒有現在對資安的觀念,若因為要增加遮罩功能而修改程式碼,複雜度相當高,要做Code Review、修改、測試等一連串的開發程序,往往需要一段時間來進行,而這段空窗期間的防護機制,即可由WAF來擔綱。

畢竟在資安領域,產品往往只是一種工具,更重要的是能駕馭產品的技術人員,同時要懂得需求、邏輯,才能夠在企業實際應用環境中發揮作用。

轉載自《不及格網管》

解決javac編譯時中文編碼警告的問題

解決javac編譯時中文編碼警告的問題


一.問題:
對於Java程式中的中文字於javac編譯時會出現如下的警告...
xxx.java:34: warning: unmappable character for encoding MS950
若忽略不管可能中文顯示時會出現亂碼~~~

二.方法:
只要輸入以下指令(指定編碼格式), 即可...
javac -encoding utf-8 -classpath D:\web\xxx\WEB-INF\classes;D:\web\xxx\WEB-INF\lib\struts.jar -d D:\web\xxx\WEB-INF\classes xxx.java

三.心得:
需注意的是,
若程式檔案存檔編碼格式為 ANSI 者,
可輸入 -encoding MS950,
若為 UTF-8 者,
可輸入 -encoding utf-8
以此類推~~~

四.其他: