題:
我怎麼只知道作者聲稱的軟件?
user3533
2013-02-07 03:08:39 UTC
view on stackexchange narkive permalink

如果沒有程序員或計算機專家的知識,我怎麼能知道某個特定程序或任何軟件通常是否沒有隱藏的有害功能,從而損害了隱私和安全性?

許多評論都是正確的。此外,如果該軟件在* nix或bsd機器上運行,則可以在該軟件上進行跟踪並觀察低級功能(即係統調用它的功能)。
如果您是編程專家,則可以使用靜態分析。基本上使用IDAPro對該程序進行反編譯,然後查看所有系統api的映射,也就是可能造成損害的api。除此之外,您還可以查看該應用程序是否正在打開它應該打開的端口或通過使用防火牆撥打電話回家。
如果某個特定軟件聲稱完全不執行任何操作,則此問題很容易。
-1
通常,您不能知道一個軟件只能做到作者所聲稱的。但是要回答您的特定問題:我如何才能知道某個特定程序是否隱藏了有害功能,從而損害了隱私和安全性?將此軟件安裝在完全未連接的計算機上-沒有互聯網,wifi,局域網等。僅將此計算機用於運行該程序。如果有任何隱藏的有害功能試圖破壞隱私和安全性,它們將失敗。
這種關注是某些人選擇開放源代碼軟件的原因之一。如果任何人都可以閱讀源代碼,那麼您就有更大的機會了解該程序是否做了任何令人不愉快的事情。
順便說一句,有人記得互聯網前時代的那些真正的計算機“病毒”嗎? -他們會更改在受害者計算機上找到的可執行文件,並將自己的代碼注入其中。這是另一種情況,即使程序是從受信任的源代碼完全構建的,也沒有人可以斷言程序的行為。
七 答案:
Tom Leek
2013-02-07 03:39:59 UTC
view on stackexchange narkive permalink

You can know whether some software does only what it announces in the same way that you can know whether the food they serve you at restaurants is poisoned or not. In plain words, you cannot, but Society has come up with various schemes to cope with the issue:

  • You can listen to friends and critics to know if the food at a given restaurant has good reputation or not.
  • You can take a sample and send it to a lab which will look for many (but not all) known poisonous substances.
  • You can ask nicely if you may observe the cook while he prepares the dishes.
  • The cook has a vested business interest in his customer being happy with the food quality, and happiness includes, in particular, not being dead.
  • Society punishes poisoners with the utmost severity and it can usually be assumed that the cook knows it.
  • You always have the extreme option of not eating there if you are too worried.

All of these can be directly transposed into the world of software. Extreme methods of ascertaining software quality and adherence to its published behaviour include very expensive and boring things like Common Criteria which boil down to, basically, knowing who made the program and with what tools.

Alternative answer: every piece of software has bugs, so it is 100% guaranteed that it does not do exactly what it is supposed to do. (This assertion includes the software which runs in the dozen or so small computers which are embedded in your car, by the way.)

有史以來最好的類比之一
那很好。替代答案也很出色。
一點:飯店是相當高的知名度和老店,而製作軟件的人可能不是。如果軟件不好,則某些匿名人士可能不會受到懲罰,您也不一定知道其聲譽。如果您知道誰真正製造了一款軟件,並且他們享有很高的聲譽,那麼這個比喻會更好。
@cpast也可以很好地涵蓋這個類比。與從街頭小販那裡買壽司相比,在一家知名的,備受好評的餐廳裡吃飯比從街頭小販那裡買壽司更安全。
還有諸如正式規範之類的東西(如果您知道規範語言,則可以閱讀該規範),並測試軟件是否符合該規範。
另外,您可以要求或查詢食譜,自己在家做飯。
或者,您也可以要求食材並自己烹飪(下載源代碼並編譯)。
這是對此類問題的典型答案。這不是完全正確的。編碼!=食物,因為語言設計師選擇了宇宙規則。人為的例子:在純函數式語言中,我已經知道100%可以確定任何函數都不會在使用空間/時間之外引起副作用。 “每個軟件都有錯誤”,是錯誤的;身份函數`id:a-> a; id x = x`沒有錯誤,僅類型本身就是證據。我還知道,我今天編寫的x64程序集中的多精度加法函數憑直覺沒有錯誤-顯然,它是正確的。
當仔細觀察時,每個類比都會分解。這就是類比的方式:它們說明了概念,以便人類的思維能夠消化它們。至於您的功能,由於硬件本身並不是沒有錯誤的...
我編寫的代碼無錯誤,無論硬件是否無錯誤。如果不做任何假設,就永遠不會“知道”任何事情。話雖如此,不要繼續相信英特爾硬件。另外:“社會以最嚴厲的方式懲罰中毒者,通常可以認為廚師知道這一點。”社會是否對Debian造成了2年(相當於後門)的隨機生成器創傷進行了懲罰?不。他們甚至沒有喪失信譽。
@Longpoke您編寫的代碼可能沒有錯誤,也許硬件也沒有錯誤。編譯器和/或解釋器是否免費?不論時間/空間使用情況本身都是一個問題。想像一下計算機正在運行(a)一個生命支持系統和(b)您的身份功能。 LFS有一些奇怪的並發錯誤,除非您的id函數的空間/時間使用迫使它出現,否則它在一百萬年內不會出現。您的id函數可以說做了超出您要求的範圍的事情。
@emory:可以很容易地驗證FP語言的非優化實現。並發錯誤的原因不是id,而是系統的其他部分有並發錯誤。如果您關心安全性,請驗證整個TCB(這意味著您不能使用像gcc / * nix / x86這樣的瘋狂堆棧),並確保其中沒有此類並發錯誤。就是說,如果這個問題確實僅是關於驗證* nix軟件的,那麼答案就很簡單:您不能。否則的任何人都使用“安全”的行業定義。 * nix是指BSD,Microsoft,Apple,UNIX等。
“廚師有既得利益,因為他的顧客沒有死。”我發誓,如果我曾經寫過關於商業經濟學的入門級教科書(可能永遠不會,但是嘿),那麼這句話就在那裡。
現在,我只需要發明一種潛在的神經毒素,它就會使勃勃勃勃在死前也重新寫他們的遺囑。 (對不起,我正在進行一些後門旅行,而這種類比是缺少的;))
David Stratton
2013-02-07 03:35:08 UTC
view on stackexchange narkive permalink

You can't, at least not with 100% accuracy. Speaking as a programmer, it's very easy to code in whatever I want, and it's not necessarily just what's advertised.

Not all unexpected activity, however, is malicious. I'm assuming you're worried more about malicious activity. Even that is not 100% possible to detect all the time, but there's hope.

You can use software that monitors things like network traffic, file activity, etc, to find clues that software is behaving in an unexpected way. For example (and I know this is just a basic tool) you can use Fiddler to see if a particular application is accessing the Internet via http(s). (Yes, I know there are better tools out there, though. Fiddler is just the first that comes to mind.) On Windows, you can use Process Monitor to get even more insight. Similar tools exist for other platforms.

There are also several other services that are available for you to use that will perform the analysis for you.

動態分析不會為您帶來任何好處。無論哪種方式,您都會遇到停頓問題。只要代碼足夠密集,由12歲兒童編寫的簡單邏輯炸彈就可以阻止所有類型的動態分析。
Jeff Ferland
2013-02-07 03:41:27 UTC
view on stackexchange narkive permalink

Especially as software becomes larger and more complicated, it becomes impossible* for even experts to answer that. To that extent, privacy and security from an application are best handled by using sandbox or Mandatory Access Control methods. The idea is behind these methods is that the software is run in a system that controls what it can do and you permit it to only do what you expect it to do. Done properly, you can limit possible connections, and be notified if the program ever tries to access files you didn't expect it to. Very advanced methods can be used to monitor memory or decrypt network traffic through a proxy service.

In short, if you can't understand everything it does, the answer is to restrict everything it can do with something it runs inside of (the operating system).

“不可能”後面有一個懸掛的星號,但是,正確的是,您應該在此處引用Donald Knuth和MetaPost。
懸掛的星號表示時間不會無限長,也不會太長。
典型的沙箱(VM,java等)/ MAC / ACL / DAC等均已失敗。我知道目前已知的唯一可用模型是能力模型。另一方面,如果您堅持使用* nix,則唯一的選擇實際上就是您提到的內容。
@Longpoke SELinux至少可以控制每個系統調用,因此包括功能控制。
@JeffFerland我不是在談論linux功能,而是在談論功能模型。
Mok-Kong Shen
2013-02-07 19:35:15 UTC
view on stackexchange narkive permalink

肯·湯普森(Ken Thompson)在廣為人知的ACM圖靈獎講座“對信任的反思”(現在正好是30年前!)中說:“您不能相信自己並未完全創建自己的代碼。”實際上,商業軟件也不例外,其他商業產品也不例外,因為在市場上享有良好聲譽的生產商提供的軟件通常具有更高的更好的可能性。但是,沒有絕對的保證。幾十年前,我從一個有病毒的知名生產商那裡得到了軟盤。在那種情況下,我個人認為這不是公司內部任何人的惡意行為,而是公司的某些計算機受到了外部病毒的感染。但是,很顯然,總的來說,不可能100%排除公司內部人員將後門引入軟件的可能性,而不管其首席執行官是否知道。如今,網絡戰爭日益迫在眉睫,後門可能成為恕我直言的極為關鍵的問題。政府的秘密機構可以通過某種方式(通過金錢,脅迫或什至是惡意軟件)進行管理,以將這種後門植入某些軟件中,這些軟件通常用於確保通信的安全性(例如與數字簽名有關的那些)並被出售。向某些不友好或潛在不友好的國家使用,並立即或在以後的某個適當時間點(“定時炸彈”等)利用後門以實現破壞目標國家的關鍵基礎設施等目標。等等。Stuxnet,Flame和Gauss是幾個名稱,應該能說明潛在惡意軟件的能力。

擴展您的觀點...即使您確實是從編寫自己的源代碼進行編譯的...也可以說您使用的編譯器並不是有害的(假設您不是從程序集編寫的。)
@Josh:這完全取決於您的賭注有多高。不僅應用軟件而且編譯器,操作系統和固件/硬件都可能是潛在的危險源。您必須明智地決定在您的情況下需要採取哪些安全措施以及哪些是多餘的(並承擔疏忽的責任)。 2012年12月,在美國DAPRA會議上旨在發現,關閉商業IT設備中的後門惡意軟件漏洞(https://www.fbo.gov/?s=opportunity&mode=form&id=55b80a80971c739699e410584819e767&tab=core&_cview=0)。特別要查看鏈接到的pdf文件中的“背景”部分。
@Josh-然後是硬件。這就是為什麼要製造計算機時,我首先使用沙子製造矽。當然,我還沒有完成呢……;)
-1
F. Hauri
2013-02-07 03:43:46 UTC
view on stackexchange narkive permalink

不幸的是,您無法...

一個好的程序員可能會被他的用戶稱為 嚮導 ,一個好的木馬會完全偽造正常環境,使受害人安靜。

某些病毒/特洛伊木馬會清除受害系統,以確保

  • 確保另一種病毒不會破壞他的工作
  • 確保不會找到殺毒軟件
  • 使受害者係統正常運行以確保受害者保持自信。

所以,你不能!如有疑問,請諮詢!!!

AJ Henderson
2013-02-07 03:43:59 UTC
view on stackexchange narkive permalink

It ultimately comes down to trust. Do you trust the reputation of the company releasing the software. If it is open source, is it used by enough developers that they would be raising flags if there were issues. There is a certain amount of strength in numbers since a commonly used product is more likely to have extensive research done on if it is trustworthy. Unless you are very paranoid, generally looking at what the community has to say about a particular piece of software is the best bet, but there will still always be bugs and there will still always be mistakes.

人們應該注意到關於開放源代碼軟件通常被忽略的地方:沒有任何技術手段可以保證某些二進制/編譯程序完全是根據其聲稱的源代碼來構建的。
@HannoBinder-是的,儘管您也可以選擇構建自己的版本,儘管不簡單,但如果做得很好,則應該對有限的技術用戶適用。
Tim X
2013-02-08 03:36:01 UTC
view on stackexchange narkive permalink

As pointed out by others, there is no guaranteed way to know. A lot of the time, you have to trust the integrity and reputation of the vendor. Following secure practices, such as only installing software from sources you trust can help, but just like real life, sometimes, we trust the wrong people.

In the end, I think we should adopt a certain level of paranoia. If you install an app on your phone, don't just accept or say yes when your phone OS informs you the phone wants access to your private information, your location, etc. Ask yourself, why does it need that access. If you feel the access the application is requesting is justified based on what you are expecting it to do, then saying yes maybe OK. On the other hand, if it seems to be requesting access to information or services which are way outside what it should need or be interested in, then be a little suspicious and consier carefully before just saying yes.



該問答將自動從英語翻譯而來。原始內容可在stackexchange上找到,我們感謝它分發的cc by-sa 3.0許可。
Loading...