删除Microsoft CVE网页时出现Python错误



所以,我读了下面的问题。答案为进一步测试提供了一些代码。

如何浏览动态分配内容的Microsoft CVE网页(最好使用Python(?

看起来像

https://portal.msrc.microsoft.com/api/security-guidance/en-US/CVE/CVE-2018-8176

不起作用。它返回默认的HTML页面,而不是实际内容。它一直工作到上个月。并且正在返回JSON数据有人能帮我找到一个可以返回正确json数据的新URL吗。

感谢

您可以下载带有CVE数据的Json,示例如下:

import json
import requests
from bs4 import BeautifulSoup
url = (
"https://api.msrc.microsoft.com/sug/v2.0/en-US/vulnerability/CVE-2018-8176"
)
data = requests.get(url).json()
# uncomment to print all data:
# print(json.dumps(data, indent=4))
print(data["cveTitle"])
print(BeautifulSoup(data["description"], "html.parser").get_text(strip=True))

打印:

Microsoft PowerPoint Remote Code Execution Vulnerability
A remote code execution vulnerability exists in Microsoft PowerPoint software when the software fails to properly validate XML content. An attacker who successfully exploited the vulnerability could run arbitrary code in the context of the current user. If the current user is logged on with administrative user rights, an attacker could take control of the affected system. An attacker could then install programs; view, change, or delete data; or create new accounts with full user rights. Users whose accounts are configured to have fewer user rights on the system could be less impacted than users who operate with administrative user rights.Exploitation of the vulnerability requires that a user open a specially crafted file with an affected version of Microsoft Office PowerPoint software. In an email attack scenario, an attacker could exploit the vulnerability by sending the specially crafted file to the user and convincing the user to open the file. In a web-based attack scenario, an attacker could host a website (or leverage a compromised website that accepts or hosts user-provided content) that contains a specially crafted file designed to exploit the vulnerability. An attacker would have no way to force users to visit the website. Instead, an attacker would have to convince users to click a link, typically by way of an enticement in an email or instant message, and then convince them to open the specially crafted file. After the file is open, the user would need to move their mouse over a specific location on the page within the PowerPoint file to trigger the vulnerability.Note that the Preview Pane is not an attack vector for this vulnerability. The security update addresses the vulnerability by correcting how Microsoft PowerPoint handles objects in memory.

相关内容

  • 没有找到相关文章

最新更新