如何在linux上安全地執行不受信任的可執行檔案?

在當今時代,對不可信的可執行檔案保持警惕並不是一個壞主意,但是如果您真的需要在Linux系統上執行一個檔案,有沒有安全的方法呢?今天的超級使用者問答帖子有一些有用的建議,以迴應一位憂心忡忡的讀者的提問。...

如何在linux上安全地執行不受信任的可執行檔案?

在當今時代,對不可信的可執行檔案保持警惕並不是一個壞主意,但是如果您真的需要在Linux系統上執行一個檔案,有沒有安全的方法呢?今天的超級使用者問答帖子有一些有用的建議,以迴應一位憂心忡忡的讀者的提問。

今天的問答環節是由SuperUser提供的,SuperUser是Stack Exchange的一個分支,是一個由社群驅動的問答網站分組。

問題

超級使用者讀者Emanuele想知道如何在Linux上安全執行不受信任的可執行檔案:

I have downloaded an executable file compiled by a third party and I need to run it on my system (Ubuntu Linux 16.04, x64) with full access to HW resources such as the CPU and GPU (through the NVIDIA drivers).

Suppose this executable file contains a virus or backdoor, how should I run it? Should I create a new user profile, run it, then delete the user profile?

如何在Linux上安全地執行不受信任的可執行檔案?

答案

超級使用者貢獻者Shiki和Emanuele為我們提供了答案。首先,志貴:

First and foremost, if it is a very high risk binary file, you would have to set up an isolated physical machine, run the binary file, then physically destroy the hard drive, the motherboard, and basically all the rest because in this day and age, even your robot vacuum can spread malware. And what if the program already infected your microwave through the computer’s speakers using high-frequency data tran**itting?!

But let’s take off that tinfoil hat and jump back to reality for a bit.

No Virtualization – Quick to Use

Firejail

I had to run a similar untrusted binary file just a few days ago and my search led to this very cool **all program. It is already packaged for Ubuntu, very **all, and has virtually no dependencies. You can install it on Ubuntu using: sudo apt-get install firejail

Package info:

007Ys3FFly1gpca9w5w3aj30hd0e73zz

Virtualization

KVM or Virtualbox

This is the safest bet depending on the binary, but hey, see above. If it has been sent by “Mr. Hacker” who is a black belt, black hat programmer, there is a chance that the binary can escape a virtualized environment.

Malware Binary – Cost Saver Method

Rent a virtual machine! For example, virtual server providers like Amazon (AWS), Microsoft (Azure), DigitalOcean, Linode, Vultr, and Ramnode. You rent the machine, run whatever you need, then they will wipe it out. Most of the bigger providers bill by the hour, so it really is cheap.

接著是伊曼紐爾的回答:

A word of caution. Firejail is OK, but one has to be extremely careful in specifying all the opti*** in terms of the blacklist and whitelist. By default, it does not do what is cited in this Linux Magazine article. Firejail’s author has also left some comments about known issues at Github.

Be extremely careful when you use it, it might give you a false sense of security without the right opti***.


有什麼要補充的解釋嗎?在評論中發出聲音。想從其他精通技術的Stack Exchange使用者那裡瞭解更多答案嗎?在這裡檢視完整的討論主題。

圖片來源:監獄囚室剪貼畫(Clker.com網站)

  • 發表於 2021-04-08 13:43
  • 閱讀 ( 27 )
  • 分類:網際網路

你可能感興趣的文章

聯結器(linker)和裝載機(loader)的區別

...後的程式碼稱為物件程式碼。連結器和載入器是用於程式執行的兩個軟體程式。本文討論了連結器和載入器之間的區別。連結器是將物件程式碼與其他檔案(如標頭檔案)連結起來並建立副檔名為.exe的可執行檔案的軟體。載入...

  • 發佈於 2020-10-19 05:42
  • 閲讀 ( 40 )

編譯時間(compile time)和執行時(runtime)的區別

關鍵區別-編譯時與執行時 大多數程式都是用高階程式語言編寫的。這些程式語言的語法與英語相似。高階語言很容易被人類理解,但計算機卻無法理解。因此,編寫的程式或原始碼應轉換成機器可理解的格式。它被稱為機器...

  • 發佈於 2020-10-19 10:25
  • 閲讀 ( 60 )

如何在任何使用python的計算機上安裝selenium webdriver

...lenium WebDriver。在本文中,我們將簡要介紹Selenium,並提供如何在系統上安裝Selenium WebDriver的詳細指南。 ...

  • 發佈於 2021-03-10 21:27
  • 閲讀 ( 64 )

為什麼java虛擬機器可以幫助程式碼更好地執行

... 以下是BZLib壓縮庫中的一個小程式碼段,它演示瞭如何使用ifdef隔離平臺特性: ...

  • 發佈於 2021-03-13 07:13
  • 閲讀 ( 50 )

口袋裡的電腦維修工具包:隨身碟上的引導cd

... 以下是一段YouTube影片,演示如何使用UNETBOOTIN建立實時USB: ...

  • 發佈於 2021-03-16 01:24
  • 閲讀 ( 49 )

在windows中以管理員身份執行任何程式的4種方法

...管理員身份執行程式才能進行更改或排除故障。下面介紹如何以管理員身份執行任何Windows程式,以及如何在出現與管理員相關的問題時修復這些問題。 ...

  • 發佈於 2021-03-19 19:32
  • 閲讀 ( 60 )

如何允許應用透過windows防火牆

... 但是,有時需要允許程式透過防火牆。下面介紹如何允許任何程式透過Windows10中的防火牆,以及更改當前允許的應用程式。 ...

  • 發佈於 2021-03-27 03:44
  • 閲讀 ( 48 )

2020年是linux惡意軟體大流行的一年嗎?

...你的系統,例如,可能是滲透他們的第一步。因此,評估如何保護您的系統是值得的。 ...

  • 發佈於 2021-03-29 07:01
  • 閲讀 ( 60 )

如何從linux命令列檢視二進位制檔案

...。檔案裡有一大堆馬廄,可以幫你分析。我們將向您展示如何使用這些工具。 識別檔案型別 檔案通常具有一些特性,允許軟體包識別它是哪種型別的檔案,以及其中的資料表示什麼。嘗試在MP3音樂播放器中開啟PNG檔案是沒有...

  • 發佈於 2021-04-02 04:41
  • 閲讀 ( 49 )

如何在linux中向$path新增目錄

...但這並沒有什麼不好的地方。我們將解釋它的作用,以及如何調整它。 什麼是$path,它是如何工作的($path on linux, and how does it work)? 當您在終端視窗中鍵入一個命令並按Enter鍵時,您甚至在執行命令之前就開始了大量的活動。 B...

  • 發佈於 2021-04-02 14:04
  • 閲讀 ( 44 )
a5283847403
a5283847403

0 篇文章

作家榜

  1. admin 0 文章
  2. 孫小欽 0 文章
  3. JVhby0 0 文章
  4. fvpvzrr 0 文章
  5. 0sus8kksc 0 文章
  6. zsfn1903 0 文章
  7. w91395898 0 文章
  8. SuperQueen123 0 文章

相關推薦