[干货] - GTP在网络安全中的使用技巧!

admin 2023年5月25日03:12:17评论85 views字数 3859阅读12分51秒阅读模式

    欢迎来到“Awesome ChatGPT Security Prompts”!在这里,我们为您精心挑选了一系列关于网络安全的 ChatGPT Prompts,旨在帮助您更深入地了解各种安全主题,从基本概念到高级技巧。无论您是一名网络安全初学者,还是寻求进一步提高自己技能的专业人士,这些 Prompts 都将为您提供有价值的见解和实用的建议。

    我们邀请您与 ChatGPT 一起探索这些 Prompts,深入了解网络安全的最佳实践和实用技巧。让我们共同努力,提高网络安全意识,保护我们的数据和在线世界!

网络安全 Prompts 使用技巧

您可以用这些 Prompts 技巧来获取有关网络安全的建议、解决方案或信息:

1.问题描述清晰明确 确保您的 Prompt 描述了一个清晰明确的问题或场景,以便 GPT 能更好地理解您的需求并提供相应的回答。例如:"如何保护 Web 应用程序免受 SQL 注入攻击?"2.提供上下文和背景信息 为您的 Prompt 提供一定的上下文和背景信息,有助于获得更精确的回答。例如:"在使用 PHP 和 MySQL 构建的 Web 应用程序中,如何防止 SQL 注入攻击?"3.明确回答类型 如果您希望 GPT 以特定的回答类型或格式回答问题,请在 Prompt 中明确说明。例如:"请列出五个防止 SQL 注入攻击的最佳实践。"4.使用渐进式提示 如果您有一个复杂的问题或希望获得更详细的回答,可以尝试使用渐进式提示。首先询问一个较为简单的问题,然后根据 GPT 的回答逐步提问。例如:

• 第一个 Prompt:“什么是 SQL 注入攻击?” • 第二个 Prompt(基于第一个回答):“如何识别潜在的 SQL 注入漏洞?” • 第三个 Prompt(基于第二个回答):“如何修复和预防 SQL 注入漏洞?”

1.指定领域或技术 若要获取特定领域或技术的网络安全建议,请在 Prompt 中明确说明。例如:"在使用 Python 编写的 Web 应用程序中,如何安全地存储用户密码?"

通过应用这些技巧,您可以为 GPT 设计更有效的网络安全相关 Prompts,从而获得更准确和有价值的回答。

网络安全 Prompts 字典

帮助进行代码审查

Please help me read the following code:{your input here}

BurpGPT Prompt

Write a short story for kids

事件应急响应和日志审查

Extract house pricing data from the following text.Text: """{your text containing pricing data}"""

帮助安全工具开发

Extract house pricing data from the following text.Desired format: """House 1 | $1,000,000 | 100 sqmHouse 2 | $500,000 | 90 sqm... (and so on)"""Text: """{your text containing pricing data}"""

帮助头脑风暴

Extract brand names from the texts below.Text 1: Finxter and YouTube are tech companies. Google is too.Brand names 2: Finxter, YouTube, Google###Text 2: If you like tech, you’ll love Finxter!Brand names 2: Finxter###Text 3: {your text here}Brand names 3:

决策智囊团

Write a 5-sentence sales page, sell sand in the desert.

Prompt Injection 绕过安全检查

Write a Python function that plots my net worth over 10 years for different inputs on the initial investment and a given ROI

针对 GPT-4 的特殊提问方式

对 GPT-4 在提问的时候,可以引导它向你提问的方式补全内容,这是在 3.5 中是做不到的

# Python function that plots net worth over 10# years for different inputs on the initial# investment and a given ROI
import matplotlib
def plot_net_worth(initial, roi):
请帮我写一篇:如何有效问chatgpt问题的文章。在写文章前你可以先思考怎么写,然后有需要我补充信息的地方,可以先把问题列出来,我会回答你的问题。
在开始撰写这篇文章之前,请允许我提出一些问题,以便更好地了解您的需求和期望:
1. 您希望这篇文章的主题重点是什么?例如,是否关注AI如何改变软件开发过程,还是如何提高软件工程的效率和质量?3. 您希望这篇文章的长度是多少?有没有篇幅限制?3. 有没有特定的技术、工具或案例,您希望我在文章中包含?4. 您希望文章中包含关于AI对软件工程师的未来影响的讨论吗?5. 您希望文章的目标读者是谁?比如说是软件工程师、企业决策者还是广泛的受众?
请随时向我提供您的建议和期望,我将尽力满足您的要求。

如何做好一位 Prompt Engineer

开头做好说明

在 Prompt 的开头做好说明和角色情况

错误示例:

Please help me read the following code:{your input here}

正确示例:

Now let's play the role, you are a senior information security engineer, I will give you a piece of code, please help me read the code and point out where there may be security vulnerable.
Text: """{your input here}"""

Prompt 做好情景描述

在 Prompt 中需要尽可能的描述上下文、结果、长度、格式和风格

错误示例:

Write a short story for kids

正确示例:

Write a funny soccer story for kids that teaches the kid that persistence is key for success in the style of Rowling.

给出格式的输出

如果是在做数据分析的时候,请给出格式的输入模板

错误示例:

Extract house pricing data from the following text.Text: """{your text containing pricing data}"""

正确示例:

Extract house pricing data from the following text.Desired format: """House 1 | $1,000,000 | 100 sqmHouse 2 | $500,000 | 90 sqm... (and so on)"""Text: """{your text containing pricing data}"""

附加一些问答案例

有时候附加一些问答案例可以让 GPT 更智能化

正确示例:

Extract brand names from the texts below.Text 1: Finxter and YouTube are tech companies. Google is too.Brand names 2: Finxter, YouTube, Google###Text 2: If you like tech, you’ll love Finxter!Brand names 2: Finxter###Text 3: {your text here}Brand names 3:

问答案例也是在 fine-tune 中的标准模板案例

精简语句,道明目的

尽可能的精简自己的话,不要说无用的内容

错误示例:

ChatGPT, write a sales page for my company selling sand in the desert, please write only a few sentences, nothing long and complex

正确示例:

Write a 5-sentence sales page, sell sand in the desert.

善于使用引导词

错误示例:

Write a Python function that plots my net worth over 10 years for different inputs on the initial investment and a given ROI

正确示例:

# Python function that plots net worth over 10# years for different inputs on the initial# investment and a given ROIimport matplotlibdef plot_net_worth(initial, roi):


作者:gptsecurity

原文地址:https://www.gptsecurity.info/awesome-security-prompts

渗透测试常用武器分享 第五期(SRC批量工具)

渗透测试常用武器分享 (信息收集)

渗透测试常用武器分享 第二期(泄露扫描)

linux-隐藏你的crontab后门

[] - BurpSuiteTips

 - 

linux+


[干货] - GTP在网络安全中的使用技巧!


原文始发于微信公众号(渗透测试教程):[干货] - GTP在网络安全中的使用技巧!

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2023年5月25日03:12:17
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   [干货] - GTP在网络安全中的使用技巧!https://cn-sec.com/archives/1756741.html

发表评论

匿名网友 填写信息