跳到正文
Skillpedia
网页抓取35k · #8281

performing-paste-site-monitoring-for-credentials

它能做什么

这个 AI 智能体会搜索人们分享代码和文本的公开网站(称为“粘贴站点”),查找密码、访问密钥等敏感信息,帮助你快速发现数据泄露。

适用场景

  • ✓检查公司的机密信息是否已经泄露时。
  • ✓调查安全事件时。
  • ✓定期测试系统安全性时。

技能链接

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-paste-site-monitoring-for-credentials/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-paste-site-monitoring-for-credentials/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“扫描粘贴站点,看看我们公司的凭据有没有泄露。”

每周 5 个新技能,1 分钟读完。

工作原理

它使用程序自动访问 Pastebin、GitHub Gists 等网站,然后根据你提供的关键词列表,查找类似密码、访问密钥或其他重要数据的模式。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Performing Paste Site Monitoring for Credentials

Overview

Paste sites (Pastebin, GitHub Gists, Ghostbin, Dpaste, Hastebin) are frequently used as staging areas for leaked credentials, database dumps, API keys, and sensitive data before wider distribution on dark web forums and Telegram channels. Monitoring these sites provides early breach detection, enabling organizations to respond before stolen data is weaponized. This skill covers building automated paste site monitors using the Pastebin Scraping API, keyword-based alerting, credential pattern matching, and integration with incident response workflows.

When to Use

  • When conducting security assessments that involve performing paste site monitoring for credentials
  • When following incident response procedures for related security events
  • When performing scheduled security testing or auditing activities
  • When validating security controls through hands-on testing

Prerequisites

  • Python 3.9+ with requests, beautifulsoup4, regex, pymisp libraries
  • Pastebin PRO account with Scraping API access ($49.95/month for programmatic access)
  • GitHub API token for Gist monitoring
  • Keyword lists specific to your organization (domains, project names, internal terms)
  • Elasticsearch or database for paste storage and search

Key Concepts

Paste Site Threat Landscape

Over 300,000 user credentials are posted on Pastebin annually, averaging 1,000 username/password pairs per leak. Paste sites serve three primary threat intelligence purposes: early breach detection (credentials appear on paste sites before dark web), threat actor profiling (actors use paste sites for C2 configuration, data staging, tool sharing), and malware discovery (encoded payloads, configuration files, C2 addresses).

Monitoring Approaches

Active monitoring queries paste site APIs or scraping endpoints at regular intervals. The Pastebin Scraping API provides real-time access to new public pastes. For GitHub, the search API allows monitoring Gists and repository commits for exposed secrets. Passive monitoring uses services like IntelX, Dehashed, or Have I Been Pwned that aggregate paste site data.

Credential Pattern Detection

Effective monitoring uses regex patterns for email:password combinations, API keys (AWS, Azure, GCP, Stripe, Twilio), database connection strings, private keys (SSH, PGP), JWT tokens, and internal hostnames/URLs. Organization-specific keywords (domain names, product names, employee names) reduce false positives.

Workflow

Step 1: Pastebin Scraping API Monitor

import requests
import re
import json
import time
from datetime import datetime

class PastebinMonitor:
    SCRAPING_URL = "https://scrape.pastebin.com/api_scraping.php"
    RAW_URL = "https://scrape.pastebin.com/api_scrape_item.php"

    def __init__(self, keywords, output_dir="paste_alerts"):
        self.keywords = [k.lower() for k in keywords]
        self.output_dir = output_dir
        self.seen_keys = set()
        self.credential_patterns = {
            "email_password": re.compile(
                r'[\w.+-]+@[\w-]+\.[\w.]+[\s:;|,]+[\S]{6,}', re.IGNORECASE),
            "aws_key": re.compile(
                r'AKIA[0-9A-Z]{16}'),
            "aws_secret": re.compile(
                r'[0-9a-zA-Z/+=]{40}'),
            "github_token": re.compile(
                r'ghp_[0-9a-zA-Z]{36}'),
            "slack_token": re.compile(
                r'xox[baprs]-[0-9a-zA-Z-]+'),
            "private_key": re.compile(
                r'-----BEGIN (?:RSA |EC |DSA )?PRIVATE KEY-----'),
            "jwt_token": re.compile(
                r'eyJ[A-Za-z0-9-_]+\.eyJ[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+'),
            "connection_string": re.compile(
                r'(?:mongodb|postgres|mysql|redis)://[^\s]+'),
            "api_key_generic": re.compile(
                r'(?:api[_-]?key|apikey|access[_-]?token)[\s]*[=:]\s*["\']?[\w-]{20,}',
                re.IGNORECASE),
        }

    def fetch_recent_pastes(self, limit=100):
        """Fetch recent public pastes from Pastebin Scraping API."""
        params = {"limit": limit}
        try:
            resp = requests.get(self.SCRAPING_URL, params=params, timeout=30)
            if resp.status_code == 200:
                pastes = resp.json()
                print(f"[+] Fetched {len(pastes)} recent pastes")
                return pastes
            else:
                print(f"[-] API error: {resp.status_code}")

…
常见问题

什么是“粘贴站点”?

这些网站允许人们粘贴并分享文本或代码,比如 Pastebin 和 GitHub Gists。遗憾的是,它们有时会被用来分享被盗的信息。

使用这个功能需要付费吗?

要想自动实时监控 Pastebin,需要付费账户(Pastebin PRO)并具备抓取 API 的权限。对于 GitHub,则需要 API 访问令牌。

它怎么知道该找什么?

它会搜索密码、API 密钥(比如云服务的密钥)以及其他敏感数据的常见格式。你还可以提供针对公司的关键词列表,让搜索更精准,减少误报。

详情

作者的原始描述

Monitor paste sites like Pastebin and GitHub Gists for leaked credentials, API keys, and sensitive data dumps using automated scraping and keyword matching to detect breaches early.

repo: mukul975/Anthropic-Cybersecurity-Skills

热度

GitHub 星标
35k
排名
#8281
许可证
Apache-2.0
更新时间
2026/8/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能