统信UOS命令行设置未签名软件安装权限_uos 安全中心 允许任意应用(1)

4.查看安全中心发现没有打开允许任意应用
image.png

5.命令行进入/usr/share/deepin-elf-verify/下

pdsyw@pdsyw-PC:~/Desktop$ sudo -i
请输入密码:
验证成功
root@pdsyw-PC:~# cd /usr/share/deepin-elf-verify/
root@pdsyw-PC:/usr/share/deepin-elf-verify# 
root@pdsyw-PC:/usr/share/deepin-elf-verify# ls -ltr
总用量 60
-rw------- 1 root root   694 6月   8  2023 whitelist
-rw------- 1 root root     0 6月   8  2023 blacklist
drwxr-xr-x 2 root root  4096 7月   6  2023 pkg-hook
drwxr-xr-x 2 root root  4096 7月   6  2023 lib
-rw-r--r-- 1 root root 36864 7月   6  2023 guard-integrity.db
-rw-r--r-- 1 root root     2 1月   9 19:36 status
-rw-r--r-- 1 root root     1 1月   9 19:36 mode
-rw-r--r-- 1 root root   578 1月   9 19:36 device
root@pdsyw-PC:/usr/share/deepin-elf-verify# 

image.png

6.替换mode值并重启deepin-elf-verify服务

root@pdsyw-PC:/usr/share/deepin-elf-verify# cat mode 
1root@pdsyw-PC:/usr/share/deepin-elf-verify# 
root@pdsyw-PC:/usr/share/deepin-elf-verify# sed -i 's/1/0/g' mode 
root@pdsyw-PC:/usr/share/deepin-elf-verify# 
root@pdsyw-PC:/usr/share/deepin-elf-verify# cat mode 
0root@pdsyw-PC:/usr/share/deepin-elf-verify# 
root@pdsyw-PC:/usr/share/deepin-elf-verify# systemctl restart deepin-elf-verify.service 
root@pdsyw-PC:/usr/share/deepin-elf-verify#

image.png

7.查看安全中心允许任意应用已经打开
image.png

8.安装未签名应用测试,能够顺利安装

pdsyw@pdsyw-PC:~/Desktop$ sudo dpkg -i electerm-1.37.1-linux-amd64.deb 
正在选中未选择的软件包 electerm。
(正在读取数据库 ... 系统当前共安装有 201694 个文件和目录。)
准备解压 electerm-1.37.1-linux-amd64.deb  ...
正在解压 electerm (1.37.1-1) ...
/home/pdsyw/Desktop/electerm-1.37.1-linux-amd64.deb
正在设置 electerm (1.37.1-1) ...
update-alternatives 是 /usr/bin/update-alternatives
update-alternatives: 使用 /opt/electerm/electerm 来在自动模式中提供 /usr/bin/electerm (electerm)
正在处理用于 hicolor-icon-theme (0.17-2) 的触发器 ...
正在处理用于 desktop-file-utils (0.23-4) 的触发器 ...
正在处理用于 bamfdaemon (0.5.4.1-1+eagle) 的触发器 ...
Rebuilding /usr/share/applications/bamf-2.index...
正在处理用于 mime-support (3.62) 的触发器 ...
pdsyw@pdsyw-PC:~/Desktop$ 

image.png

9.使用正常
image.png

10.替换mode值并重启deepin-elf-verify服务

root@pdsyw-PC:/usr/share/deepin-elf-verify# cat mode 
0root@pdsyw-PC:/usr/share/deepin-elf-verify# 
root@pdsyw-PC:/usr/share/deepin-elf-verify# sed -i 's/0/1/g' mode 
root@pdsyw-PC:/usr/share/deepin-elf-verify# 
root@pdsyw-PC:/usr/share/deepin-elf-verify# cat mode 
1root@pdsyw-PC:/usr/share/deepin-elf-verify# 
root@pdsyw-PC:/usr/share/deepin-elf-verify# systemctl restart deepin-elf-verify
root@pdsyw-PC:/usr/share/deepin-elf-verify# 

image.png

11.安全中心允许任意应用已经关闭
外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传

12.安装未签名软件报错

pdsyw@pdsyw-PC:~/Desktop$ sudo dpkg -i electerm-1.37.1-linux-amd64.deb 
请输入密码:
验证成功
You cannot install '/home/pdsyw/Desktop/electerm-1.37.1-linux-amd64.deb' that failed the verification, please go to Security Center - Security Tools - Application Security to adjust.
dpkg: 处理归档 electerm-1.37.1-linux-amd64.deb (--install)时出错:
 执行钩子 /usr/sbin/deepin-pkg-install-hook -e hc-verifysign 出错,退出状态为 65280
在处理时有错误发生:
 electerm-1.37.1-linux-amd64.deb
pdsyw@pdsyw-PC:~/Desktop$ 

image.png

二、知识扩展
1.启用安全中心中仅允许签名应用中的统信商店应用

root@pdsyw-PC:/usr/share/deepin-elf-verify# cat status 
14root@pdsyw-PC:/usr/share/deepin-elf-verify# 
root@pdsyw-PC:/usr/share/deepin-elf-verify# sed -i 's/14/2/g' status 
root@pdsyw-PC:/usr/share/deepin-elf-verify# 
root@pdsyw-PC:/usr/share/deepin-elf-verify# cat status 
2root@pdsyw-PC:/usr/share/deepin-elf-verify# 
root@pdsyw-PC:/usr/share/deepin-elf-verify# systemctl restart deepin-elf-verify
root@pdsyw-PC:/usr/share/deepin-elf-verify#

image.png
image.png

2.启用安全中心中仅允许签名应用中的统信商店应用、企业自研应用

root@pdsyw-PC:/usr/share/deepin-elf-verify# cat status 
2root@pdsyw-PC:/usr/share/deepin-elf-verify# 
root@pdsyw-PC:/usr/share/deepin-elf-verify# sed -i 's/2/6/g' status 
root@pdsyw-PC:/usr/share/deepin-elf-verify# 
root@pdsyw-PC:/usr/share/deepin-elf-verify# cat status 
6root@pdsyw-PC:/usr/share/deepin-elf-verify# 
root@pdsyw-PC:/usr/share/deepin-elf-verify# systemctl restart deepin-elf-verify
root@pdsyw-PC:/usr/share/deepin-elf-verify#

外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传
image.png

3.启用安全中心中仅允许签名应用中的统信商店应用、第三方软件厂商应用

root@pdsyw-PC:/usr/share/deepin-elf-verify# cat status 
6root@pdsyw-PC:/usr/share/deepin-elf-verify# 
root@pdsyw-PC:/usr/share/deepin-elf-verify# sed -i 's/6/10/g' status 
root@pdsyw-PC:/usr/share/deepin-elf-verify# 
root@pdsyw-PC:/usr/share/deepin-elf-verify# cat status 
10root@pdsyw-PC:/usr/share/deepin-elf-verify# 
root@pdsyw-PC:/usr/share/deepin-elf-verify# systemctl restart deepin-elf-verify
root@pdsyw-PC:/usr/share/deepin-elf-verify# 

image.png
image.png

4.启用安全中心中仅允许签名应用中的统信商店应用、企业自研应用、第三方软件厂商应用

root@pdsyw-PC:/usr/share/deepin-elf-verify# cat status 
10root@pdsyw-PC:/usr/share/deepin-elf-verify# 
root@pdsyw-PC:/usr/share/deepin-elf-verify# sed -i 's/10/14/g' status 


## 学习路线:

这个方向初期比较容易入门一些,掌握一些基本技术,拿起各种现成的工具就可以开黑了。不过,要想从脚本小子变成黑客大神,这个方向越往后,需要学习和掌握的东西就会越来越多以下是网络渗透需要学习的内容:  
 ![在这里插入图片描述](https://img-blog.csdnimg.cn/7a04c5d629f1415a9e35662316578e07.png#pic_center)





**网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。**

**[需要这份系统化资料的朋友,可以点击这里获取](https://bbs.csdn.net/topics/618540462)**

**一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!**

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值