浏览代码

ME might affect many x86 installs, so instead of stopping the show just remove the interface, which reduces risks a little

Bob Mottram 8 年前
父节点
当前提交
c9a1c8b510
共有 2 个文件被更改,包括 30 次插入8 次删除
  1. 1
    1
      src/freedombone-tests
  2. 29
    7
      src/freedombone-utils-setup

+ 1
- 1
src/freedombone-tests 查看文件

1148
 
1148
 
1149
 test_app_functions
1149
 test_app_functions
1150
 test_unique_onion_ports
1150
 test_unique_onion_ports
1151
-check_for_AMT
1151
+remove_management_engine_interface
1152
 fix_stig
1152
 fix_stig
1153
 test_stig
1153
 test_stig
1154
 
1154
 

+ 29
- 7
src/freedombone-utils-setup 查看文件

371
     fi
371
     fi
372
 }
372
 }
373
 
373
 
374
-function check_for_AMT {
375
-    pci_hardware=$(lspci)
376
-    if [[ "$pci_hardware" == *"MEI"* || "$pci_hardware" == *"HECI"* ]]; then
377
-        echo $'Intel Active Management Technology (Management Engine) was detected. This is an active backdoor.'
378
-        exit 782352
374
+function remove_management_engine_interface {
375
+    # see https://www.kernel.org/doc/Documentation/misc-devices/mei/mei.txt
376
+    # Disabling this interface doesn't cure the problems of ME, but it
377
+    # might stop an adversary in control of AMT from using the command
378
+    # interface to control the operating system.
379
+    if [ -f /dev/mei0 ]; then
380
+        rmmod mei_me
381
+        rmmod mei0
382
+    fi
383
+
384
+    blacklist_changed=
385
+    if [ ! -f /etc/modprobe.d/blacklist.conf ]; then
386
+        touch /etc/modprobe.d/blacklist.conf
387
+        blacklist_changed=1
388
+    fi
389
+    if ! grep -q "blacklist mei" /etc/modprobe.d/blacklist.conf; then
390
+        echo "blacklist mei" >> /etc/modprobe.d/blacklist.conf
391
+        blacklist_changed=1
392
+    fi
393
+    if ! grep -q "blacklist mei_me" /etc/modprobe.d/blacklist.conf; then
394
+        echo "blacklist mei_me" >> /etc/modprobe.d/blacklist.conf
395
+        blacklist_changed=1
396
+    fi
397
+
398
+    if [ $blacklist_changed ]; then
399
+        depmod -ae -E
400
+        update-initramfs -u
379
     fi
401
     fi
380
 }
402
 }
381
 
403
 
609
     read_config_param "PROJECT_REPO"
631
     read_config_param "PROJECT_REPO"
610
     write_config_param "PROJECT_REPO" "$PROJECT_REPO"
632
     write_config_param "PROJECT_REPO" "$PROJECT_REPO"
611
 
633
 
612
-    function_check check_for_AMT
613
-    check_for_AMT
634
+    function_check remove_management_engine_interface
635
+    remove_management_engine_interface
614
 
636
 
615
     function_check separate_tmp_filesystem
637
     function_check separate_tmp_filesystem
616
     separate_tmp_filesystem 150
638
     separate_tmp_filesystem 150