标签搜索
后端-08-安全
程序员的自留地

后端-08-安全

fiora
2026-10-21 / 0 评论 / 7 阅读
本段 17 题 | 来源:backend + general + design | 知识点:安全

1. 客户端-服务器架构(Client-Server Architecture)有哪些主要优势?为什么它在现实世界中被广泛使用?

  • 知识点: 安全 / 系统设计/架构 / UI/UX 设计 / 编程语言基础 (主题: system-design;标签: centralized-management, scalability, security, resource-sharing)
  • 类型: technical | 难度: easy | 子类型:
  • 分类: general
  • id: 695e01071da553795636b5e7 | 官方: 是 | 付费: 否

答案:

TL;DRClient-Server 架构(Client-Server Architecture)的优势在于集中管理(Centralized Management)、资源共享(Resource Sharing)、可扩展(Scalability)以及更容易实现统一的安全控制(Unified Security Control),因此在 Web、邮件、银行和云计算(Cloud Computing)等系统中广泛使用。
主要优势- 集中管理(Centralized Management):服务器统一管理资源、数据与安全策略,维护和升级更容易。

  • 可扩展性:可纵向扩容(提升硬件)或横向扩容(增加服务器实例)。
  • 资源共享:多个客户端共享数据库、文件或应用服务。
  • 安全性:集中化控制便于统一实现鉴权、加密、访问控制等。
    常见应用- Web 浏览(Web Browsing)
  • Email 服务
  • 在线银行
  • 云计算平台

2. What are TACACS (Terminal Access Controller Access Control System) and RADIUS (Remote Authentication Dial In User Service) in networking?

网络中的 TACACS(终端访问控制器访问控制系统)和 RADIUS(远程认证拨号用户服务)是什么?
  • 知识点: 安全 / 操作系统与网络 (标签: interviewbit, cisco, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: Cisco
  • id: 69b37a1258d557c902ba2caa | 官方: 否 | 付费: 否

答案:

  • TACACS: It is a group of remote authentication protocols useful in controlling remote authentication and other related services for the networked access control via a centralized server. TACACS will help for determining whether the user is having access to the network or not as it will permit the remote access server to communicate with an authentication server.
  • RADIUS: It is an AAA (Authentication, Authorization, and Accounting) protocol to control access to network resources. RADIUS is used by ISPs (Internet Service Providers) and corporations to manage access into the Internet or internal networks across a group of access technologies that include wireless, DSL, modem, and VPNs.

3. Who is in possession of the encryption keys?

谁拥有加密密钥?
  • 知识点: 安全 (标签: interviewbit, commvault, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: Commvault
  • id: 69b37a4d58d557c902ba50c5 | 官方: 否 | 付费: 否

答案:

The encryption keys are not accessible to anyone. These keys are encrypted with the client's RSA public key and kept in the CommServe database. Depending on the settings, the client's RSA private key is encrypted with either a built-in passphrase or a passphrase provided by the user. The Pass Phrase entered by the user is not saved. These passphrases can only be set and changed by authorised users (as determined by user management). Passphrases are never written down in plain text.

加密密钥不向任何人开放访问。这些密钥使用客户端的 RSA 公钥加密,并存储在 CommServe 数据库中。根据设置,客户端的 RSA 私钥使用内置密码短语或用户提供的密码短语进行加密。用户输入的密码短语不会被保存。这些密码短语只能由授权用户(根据用户管理确定)设置和更改。密码短语从不以明文形式书写。

4. How much of a performance hit can you expect as a result of encryption?

由于加密,您预计会遭受多大的性能损失?
  • 知识点: 安全 (标签: interviewbit, commvault, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: Commvault
  • id: 69b37a4d58d557c902ba50d1 | 官方: 否 | 付费: 否

答案:

Software encryption is a CPU-intensive activity that can slow down your backup or supplemental copy by 40 per cent to 50 percent. This projected performance hit does not apply to deduplicated data because the deduplication process removes all duplicate data and only encrypts data blocks that are unique throughout the whole deduplication database. As a result, the performance impact of deduplicated data will be minimal.

软件加密是一项 CPU 密集型活动,可能会使您的备份或补充副本速度降低 40% 到 50%。这一预期的性能损失不适用于去重数据,因为去重过程会移除所有重复数据,并且仅加密在整个去重数据库中唯一的数据块。因此,去重数据的性能影响将是最小的。

5. What is the Man-in-the-Middle Attack in context to Cyber Security?

在网络安全背景下,什么是中间人攻击?
  • 知识点: 安全 (标签: interviewbit, deloitte, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: 德勤
  • id: 69b37a6f58d557c902ba69ab | 官方: 否 | 付费: 否

答案:

A man-in-the-middle attack is a cyber threat (a form of eavesdropping assault) in which a cybercriminal wiretaps a conversation or data transmission involving two people. When a cybercriminal joins a two-way chat, they appear to be authentic participants, giving them the ability to gather sensitive information and respond in a number of ways. The main purpose of this type of attack is to gain access to personal information about our enterprise or consumers. A cybercriminal could, for example, intercept data flowing between the target device and the network on an unprotected Wi-Fi network.

中间人攻击是一种网络威胁(一种窃听攻击形式),其中网络犯罪分子窃听涉及两个人的对话或数据传输。当网络犯罪分子加入双向聊天时,他们看起来是真实的参与者,从而使他们能够收集敏感信息并以多种方式做出回应。此类攻击的主要目的是获取有关我们企业或消费者的个人信息。例如,网络犯罪分子可以在未受保护的 Wi-Fi 网络上拦截目标设备与网络之间流动的数据。

As we can understand from the image, a man-in-the-middle attack is a form of eavesdropping attack in which an attacker intercepts a conversation or data transfer in progress. The attackers pose as both genuine participants after inserting themselves in the "middle" of the transfer. This allows an attacker to intercept data and information from both parties while also providing malicious links or other information to both genuine participants in a way that may not be detected until it is too late.

从图中我们可以了解到,中间人攻击是一种窃听攻击形式,攻击者会拦截正在进行的对话或数据传输。攻击者在插入到传输的“中间”后,会冒充双方的真实参与者。这使得攻击者能够拦截来自双方的数据和信息,同时以可能直到为时已晚才被发现的方式向双方真实参与者提供恶意链接或其他信息。

6. In Palo Alto, what do you mean by endpoint security?

在 Palo Alto 中,端点安全是什么意思?
  • 知识点: 安全 (标签: interviewbit, palo-alto, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: Palo Alto Networks
  • id: 69b37c0b58d557c902bb6da3 | 官方: 否 | 付费: 否

答案:

Endpoints are frequently targeted in cybercrime, cyberespionage, and cyber warfare attacks. Endpoint security protects endpoints from malicious software. Computing equipment connected to a local or wide area network is referred to as an endpoint. Desktop PCs, laptops, smartphones, servers, and even Internet-of-things (IoT) devices are examples of endpoints.

端点经常成为网络犯罪、网络间谍和网络战攻击的目标。端点安全保护端点免受恶意软件的侵害。连接到局域网或广域网的计算机设备被称为端点。台式电脑、笔记本电脑、智能手机、服务器甚至物联网 (IoT) 设备都是端点的示例。

Endpoint security solutions safeguard endpoints from cyber threats and unauthorised activities. Endpoint security solutions have progressed from standard antivirus to include a comprehensive set of defences to protect against known and undiscovered malware, fileless attacks, exploits, and post-intrusion attack tactics. Endpoint security solutions are frequently able to isolate compromised endpoints, preventing assaults from spreading to numerous endpoints, because threat actors may target endpoints as a conduit into an organisation's network.

端点安全解决方案保护端点免受网络威胁和未经授权的活动。端点安全解决方案已从标准防病毒软件发展为包含一整套全面的防御措施,以防范已知和未知的恶意软件、无文件攻击、漏洞利用和入侵后攻击策略。端点安全解决方案通常能够隔离受感染的端点,防止攻击蔓延到众多端点,因为威胁行为者可能将端点作为进入组织网络的通道。

7. What are some common security vulnerabilities in software and how do you prevent them?

软件中一些常见的安全漏洞是什么,您如何防范它们?
  • 知识点: 安全 (标签: interviewbit, tcs-digital, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: Tata Consultancy Services
  • id: 69b37c6d58d557c902bc8625 | 官方: 否 | 付费: 否

答案:

Vulnerabilities are weaknesses or flaws in software systems, networks, or devices that can be exploited by attackers to gain unauthorized access, steal sensitive data, disrupt operations, or cause other types of harm. They can occur due to design flaws, programming errors, configuration mistakes, or other factors, and can be exploited by cybercriminals using a variety of techniques, such as malware, social engineering, or brute force attacks. The consequences of vulnerabilities can range from minor disruptions to severe data breaches, financial losses, or even physical damage in some cases.

漏洞是软件系统、网络或设备中的弱点或缺陷,攻击者可以利用它们来获得未经授权的访问、窃取敏感数据、破坏运营或造成其他类型的伤害。它们可能由于设计缺陷、编程错误、配置错误或其他因素而出现,并可能被网络犯罪分子使用各种技术(如恶意软件、社会工程或暴力破解攻击)加以利用。漏洞的后果范围从轻微中断到严重的数据泄露、财务损失,在某些情况下甚至会造成物理损坏。

There are many common security vulnerabilities in software, and some of the most common ones are:

软件中有许多常见的安全漏洞,其中一些最常见的包括:
  1. Input validation: Input validation vulnerabilities occur when the software does not properly validate user input, allowing attackers to inject malicious code or data into the system. 2. SQL injection: SQL injection vulnerabilities occur when the software does not properly sanitize user input in SQL queries, allowing attackers to inject malicious SQL code into the database. To prevent SQL injection vulnerabilities, you should use parameterized queries and prepared statements, and you should also use robust SQL injection prevention libraries. 3. Cross-site scripting (XSS): XSS vulnerabilities occur when the software does not properly sanitize user input in HTML or JavaScript, allowing attackers to inject malicious code into the web page. To prevent XSS vulnerabilities, you should use input validation techniques, such as sanitizing, filtering, and validating input, and you should also use robust XSS prevention libraries. 4. Cross-site request forgery (CSRF): CSRF vulnerabilities occur when the software does not properly verify the authenticity of web requests, allowing attackers to forge requests and perform actions on behalf of the user. To prevent CSRF vulnerabilities, you should use CSRF prevention techniques, such as using tokens or cookies, and you should also use robust CSRF prevention libraries. 5. Insecure communications: Insecure communication vulnerabilities occur when the software does not use secure communication protocols, such as HTTPS, allowing attackers to intercept and manipulate data transmitted between the client and the server. To prevent insecure communication vulnerabilities, you should use secure communication protocols and technologies, such as HTTPS, SSL, and TLS.

    1. 输入验证:当软件未正确验证用户输入时,就会出现输入验证漏洞,允许攻击者向系统注入恶意代码或数据。 2. SQL 注入:当软件未正确清理 SQL 查询中的用户输入时,就会出现 SQL 注入漏洞,允许攻击者向数据库注入恶意 SQL 代码。要防止 SQL 注入漏洞,您应该使用参数化查询和预编译语句,并且还应该使用强大的 SQL 注入防御库。 3. 跨站脚本 (XSS):当软件未正确清理 HTML 或 JavaScript 中的用户输入时,就会出现 XSS 漏洞,允许攻击者向网页注入恶意代码。要防止 XSS 漏洞,您应该使用输入验证技术,例如清理、过滤和验证输入,并且还应该使用强大的 XSS 防御库。 4. 跨站请求伪造 (CSRF):当软件未正确验证 Web 请求的真实性时,就会出现 CSRF 漏洞,允许攻击者伪造请求并代表用户执行操作。要防止 CSRF 漏洞,您应该使用 CSRF 防御技术,例如使用令牌或 Cookie,并且还应该使用强大的 CSRF 防御库。 5. 不安全的通信:当软件未使用安全通信协议(如 HTTPS)时,就会出现不安全通信漏洞,允许攻击者拦截和操纵客户端与服务器之间传输的数据。要防止不安全通信漏洞,您应该使用安全通信协议和技术,例如 HTTPS、SSL 和 TLS。

To prevent these vulnerabilities, you should use input validation techniques, parameterized queries and prepared statements, XSS prevention libraries, CSRF prevention techniques and libraries, and secure communication protocols and technologies.

要防范这些漏洞,您应该使用输入验证技术、参数化查询和预编译语句、XSS 防御库、CSRF 防御技术和库,以及安全通信协议和技术。

8. What exactly are the HTTP and HTTPS protocols?

HTTP 和 HTTPS 协议究竟是什么?
  • 知识点: 安全 / 操作系统与网络 / 系统设计/架构 / UI/UX 设计 (主题: system-design;标签: http, https, tls, security)
  • 类型: technical | 难度: medium | 子类型:
  • 分类: backend
  • id: 695b63eb2873cad90baba6cd | 官方: 是 | 付费: 否

答案:

TL;DRHTTP is a stateless web protocol over TCP (default port 80). HTTPS is HTTP secured with SSL/TLS encryption (default port 443).

简而言之HTTP 是运行在 TCP 之上的无状态 Web 协议(默认端口 80)。HTTPS 是使用 SSL/TLS 加密保护的 HTTP(默认端口 443)。
HTTP- Application-layer protocol
HTTP- 应用层协议
  • Stateless
  • Runs over TCP
  • Default port: 80
    HTTPS- HTTP + SSL/TLS security

    HTTPS - HTTP + SSL/TLS 安全
  • Encrypts traffic and helps verify server identity
  • Default port: 443

9. 如何提升排行榜系统(Leaderboard System)的安全性,防止恶意玩家(Malicious Players)伪造分数更新(Score Update Forgery)?请列举关键安全措施(Security Measures)。

  • 知识点: 安全 / 系统设计/架构 / UI/UX 设计 (主题: system-design;标签: jwt, encryption, rate-limit, least-privilege, telemetry, shadow-ban)
  • 类型: technical | 难度: medium | 子类型:
  • 分类: backend
  • id: 695dfa151da5537956361e57 | 官方: 是 | 付费: 否

答案:

TL;DR防止伪造分数更新可以从通信、鉴权(Authentication)、行为检测(Behavior Detection)与访问控制(Access Control)多层防护:加密通信、防抓包;使用 JWT 做授权;限流防刷;遥测(Telemetry)检测异常分数;对恶意玩家 shadow ban;并贯彻最小权限原则(Principle of Least Privilege)。
关键措施- 加密通信:使用 HTTPS/TLS 防止 packet sniffing(数据包嗅探)。

  • 异常检测:telemetry 检测异常得分模式。
  • Shadow ban:对恶意玩家隐藏其影响。
  • JWT 授权:验证玩家身份与权限。
  • Rate limiting:限制请求频率防止刷分。
  • Least privilege:最小权限原则限制资源访问。

10. 通知系统(Notification System)在安全方面需要做哪些保护?如何使用认证授权(OAuth2/RBAC)与 API Gateway(API网关)限流(Rate Limiting)来防止滥用或 DoS(拒绝服务攻击)?

  • 知识点: 安全 / 系统设计/架构 / UI/UX 设计 (主题: system-design;标签: oauth2, rbac, api-gateway, rate-limiting, dos-protection, authentication, authorization)
  • 类型: technical | 难度: medium | 子类型:
  • 分类: backend
  • id: 695dfe121da5537956367a5c | 官方: 是 | 付费: 否

答案:

TL;DR通知系统需要对入口请求做强认证(Authentication)与授权(Authorization),并通过 API Gateway 做限流防滥用。常见做法是 OAuth2.0 认证、RBAC(基于角色的访问控制)授权限制调用权限,并在网关层限制请求速率以降低 DoS(拒绝服务攻击)风险。
关键措施- Authentication(认证):对所有请求使用 OAuth2.0 等机制认证调用方身份。

  • Authorization:使用 RBAC 限制不同系统/用户的可用接口与权限。
  • Rate Limiting:在 API Gateway 设置限流避免滥用或 DoS。
  • 最小权限原则:各组件与服务只拥有必要权限。

11. 什么是限流(Rate Limiting)?为什么要用它?

  • 知识点: 安全 / 系统设计/架构 / UI/UX 设计 (主题: system-design;标签: Rate limiting, 流量控制, 滥用防护)
  • 类型: technical | 难度: medium | 子类型:
  • 分类: backend
  • id: 6960ae7f0e32007ea0d0b56d | 官方: 是 | 付费: 否

答案:

核心答案限流(Rate Limiting)是一种控制单位时间内请求数量的机制,用于限制网络流量、保护服务稳定性。原文描述要点:

  • 用于限制网络流量,通常会跟踪 IP 地址 与请求间隔时间。
  • 除了减少流量压力,还能帮助识别并阻断可疑或恶意活动。
    补充:常见实现包括令牌桶(Token Bucket)/漏桶(Leaky Bucket)算法、基于网关/反向代理(Reverse Proxy)(如 Nginx/Envoy)、或云 WAF(Web应用防火墙)/API Gateway 的限流策略。

12. 你如何在应用中确保数据安全(Data Security)?

  • 知识点: 安全 / 系统设计/架构 / UI/UX 设计 (主题: system-design;标签: data-security, encryption, authentication, secure-coding, pen-test)
  • 类型: technical | 难度: hard | 子类型:
  • 分类: backend
  • id: 695cc0361da553795622a850 | 官方: 是 | 付费: 否

答案:

TL;DR通过安全编码(Secure Coding)、传输与存储加密、强认证(Strong Authentication)、定期安全测试(Security Testing),并遵循行业最佳实践与法规来保护数据。
数据安全对于保护敏感信息、维护信任、合规(Compliance)以及避免财务损失非常重要。开发应用时可以采取多种措施确保数据安全。
使用安全编码实践:例如输入校验(Input Validation)、访问控制、错误处理(Error Handling)等。
加密传输与存储数据:对传输过程与数据库存储中的数据进行加密,防止数据泄露与未授权访问(Unauthorized Access)。
实现强认证(Strong Authentication)机制:使用健壮的身份认证(Authentication)技术,确保只有授权用户可以访问敏感数据。
定期进行安全测试(Security Testing):包括漏洞扫描(Vulnerability Scanning)与渗透测试(Penetration Testing),提前发现并修复风险。
遵循行业最佳实践(Industry Best Practices):遵守组织安全规范与政府法规,确保应用安全、稳定与可持续。

13. 如何防止机器人抓取(Scraping)一个公开 API?

  • 知识点: 安全 / 系统设计/架构 / UI/UX 设计 (主题: system-design;标签: rate-limiting, throttling, bot-detection, http-error)
  • 类型: technical | 难度: hard | 子类型:
  • 分类: backend
  • id: 695ccbc41da5537956248fc8 | 官方: 是 | 付费: 否

答案:

TL;DR公开 API 无法完全防止抓取,但可通过限流(Rate Limiting)/节流(Throttling)、超限返回 HTTP 错误,以及引入 bot 检测(Bot Detection)方案来显著降低爬取行为。
如果 API 内的数据是公开可访问的,那么几乎不可能完全阻止数据抓取。不过,节流(Throttling)是一种有效的方式,用于阻止机器人在特定时间内发起过多请求。
此外,当请求超过定义阈值时应返回 HTTP 错误。除此之外,一个优秀的 bot 检测方案可以识别访问行为,并自动阻止表现出抓取特征的恶意机器人。

14. Is the data encrypted twice if you enable encryption during backup and offline/auxiliary copy?

如果在备份和离线/辅助复制期间启用加密,数据会被加密两次吗?
  • 知识点: 安全 (标签: interviewbit, commvault, company-specific)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: general
  • 公司: Commvault
  • id: 69b37a4d58d557c902ba50fb | 官方: 否 | 付费: 否

答案:

No, the data is not double-encrypted. Data that has been encrypted by HDPS Monitor software is flagged. The flag is checked during an auxiliary copy operation, and if the data has already been encrypted, no additional software encryption is used. During the auxiliary copy procedure, only data that has not been encrypted by HDPS will be encrypted.

不会,数据不会被双重加密。已由 HDPS Monitor 软件加密的数据会被标记。在辅助复制操作期间会检查该标记,如果数据已经加密,则不会使用额外的软件加密。在辅助复制过程中,只有尚未由 HDPS 加密的数据才会被加密。

15. When writing to the media, can encryption have an effect on compression?

写入介质时,加密会影响压缩吗?
  • 知识点: 安全 (标签: interviewbit, commvault, company-specific)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: general
  • 公司: Commvault
  • id: 69b37a4d58d557c902ba50fe | 官方: 否 | 付费: 否

答案:

Yes, data is effectively randomised when backup procedures are performed using encryption. This means that while compressing encrypted data, compression methods will be less effective. As a result, there will be a visible difference in the compression ratio when this data is written to the media.

会,使用加密执行备份过程时,数据会被有效随机化。这意味着在压缩加密数据时,压缩方法的效果会降低。因此,当这些数据写入介质时,压缩比会出现明显差异。

For example, a tape with a native capacity of 110GB that was formerly compressed to 190GB may now only be able to write 124GB to the same tape when encryption is used. The amount of data that can be written to tape depends on the type of data that is being written. Image files will not be compressed because they are already compressed, however, a TXT file will be compressed heavily.

例如,一盘原生容量为 110GB 的磁带以前可压缩至 190GB,而现在使用加密时,同一盘磁带可能只能写入 124GB。可写入磁带的数据量取决于所写入数据的类型。图像文件不会被压缩,因为它们已经被压缩,然而,TXT 文件会被大幅压缩。

16. Is a Certificate Authority required for encryption in Commvault?

Commvault 中的加密需要证书颁发机构吗?
  • 知识点: 安全 (标签: interviewbit, commvault, company-specific)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: general
  • 公司: Commvault
  • id: 69b37a4d58d557c902ba5101 | 官方: 否 | 付费: 否

答案:

Only in the case of asymmetric cryptography, where distinct keys are used to encrypt (with the private key) and decrypt (with the public key), is a Certificate Authority required. There is no need for a certificate or a certificate authority because all of our encryption is symmetric (the same key is used to encrypt and decrypt).

只有在非对称加密的情况下才需要证书颁发机构,即使用不同的密钥进行加密(使用私钥)和解密(使用公钥)。不需要证书或证书颁发机构,因为我们所有的加密都是对称的(使用相同的密钥进行加密和解密)。

When exchanging data over insecure lines (such as the internet), and the identity of the entities on both ends is unknown, asymmetric crypto is employed. The CA helps validate the validity of the sent data, ensuring that malicious material is not sent. This issue does not exist in our situation because both endpoints have known entities.

在不安全的线路(如互联网)上交换数据,且两端实体的身份未知时,会采用非对称加密。CA 有助于验证所发送数据的有效性,确保不会发送恶意内容。在我们的情况下不存在这个问题,因为两端都是已知实体。

17. A Network Security Engineer in an Enterprise Deployment wants to assign to a group of administrators without having to create local administrator accounts on the firewall. Which method of authentication must be used?

企业部署中的一名网络安全工程师希望向一组管理员进行分配,而无需在防火墙上创建本地管理员账户。必须使用哪种身份验证方法?
  • 知识点: 安全 (标签: interviewbit, palo-alto, company-specific)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: general
  • 公司: Palo Alto Networks
  • id: 69b37c0c58d557c902bb6ddd | 官方: 否 | 付费: 否

答案:

RADIUS with Vendor-Specific Attributes must be used.

必须使用带供应商特定属性的 RADIUS。
0

评论

博主关闭了当前页面的评论
EN