T09 · Insecure Skill Coding Practices
- Location
SKILL.md:37- Finding
Router Credentials and Administrative Traffic Transmitted over an Unencrypted API Connection
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is purpose-built for MikroTik router administration, but its examples use unsafe connection and installation defaults that could expose router credentials or affect sensitive infrastructure.
Review before installing. Use this only with a least-privilege MikroTik account, prefer TLS on port 8729 with certificate and hostname verification enabled, avoid curl commands that place passwords on the command line, and install dependencies in an isolated virtual environment rather than modifying system Python.
SKILL.md:37Router Credentials and Administrative Traffic Transmitted over an Unencrypted API Connection
SKILL.md:55TLS Certificate and Hostname Verification Disabled for Router Management Connections
SKILL.md:488Router Passwords Embedded in Curl Command-Line Arguments
SKILL.md:12Unpinned Third-Party Package Installed into the System Python Environment
The documentation presents copy-pastable curl commands with placeholders for credentials, arbitrary REST paths, and disabled certificate checks. In a high-privilege router-management context, that combination can facilitate parameter abuse, accidental destructive operations, and credential exposure if users adapt the examples without understanding the risks.
RouterOS 7.1+ also supports a REST API over HTTP/HTTPS. Use when the Python library is unavailable.
# GET - Read resources
curl -k -u user:pass https://<IP>/rest/ip/address
Explicitly setting ssl_verify=False in the primary SSL example normalizes insecure transport behavior. Given the administrative power over firewall, routing, VPN, and system functions, users copying this pattern could compromise both credentials and device integrity.
password=password,
plaintext_login=True,
use_ssl=True,
ssl_verify=False, # Set True with proper certs
ssl_verify_hostname=False,
port=8729
)
Explicitly setting ssl_verify=False in the primary SSL example normalizes insecure transport behavior. Given the administrative power over firewall, routing, VPN, and system functions, users copying this pattern could compromise both credentials and device integrity.
password=password,
plaintext_login=True,
use_ssl=True,
ssl_verify=False, # Set True with proper certs
ssl_verify_hostname=False,
port=8729
)
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
RouterOS 7.1+ also supports a REST API over HTTP/HTTPS. Use when the Python library is unavailable.
# GET - Read resources
curl -k -u user:pass https://<IP>/rest/ip/address
The REST examples include real credential-bearing requests while disabling TLS validation (-k, verify=False) and do not place an explicit warning immediately around those examples. That creates a meaningful risk of credential interception or man-in-the-middle attacks, especially because this skill is for managing network infrastructure and may be copied verbatim by users.
Skill grants unrestricted tool access without appropriate constraints. An agent with unfettered tool access can perform arbitrary actions including file modification, network requests, and code execution.
# DELETE - Remove entry
curl -k -u user:pass -X DELETE https://<IP>/rest/ip/address/*1
# POST - Run any command
curl -k -u user:pass -X POST https://<IP>/rest/ip/address/print \
--data '{"_proplist":["address","interface"]}' \
-H "content-type: application/json"
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
curl -k -u user:pass -X POST https:///rest/ip/address/print
--data '{"_proplist":["address","interface"]}'
-H "content-type: application/json"
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
curl -k -u user:pass -X POST https:///rest/ip/address/print
--data '{"_proplist":["address","interface"]}'
-H "content-type: application/json"
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
curl -k -u user:pass -X POST https:///rest/ip/address/print
--data '{"_proplist":["address","interface"]}'
-H "content-type: application/json"
The Python REST example uses verify=False, which disables server certificate validation and exposes Basic Auth credentials to interception by a man-in-the-middle. In a router administration skill, users may run these examples against sensitive infrastructure, raising the practical risk.
auth = HTTPBasicAuth('<USER>', '<PASS>')
# GET all interfaces
r = requests.get(f'{base}/interface', auth=auth, verify=False)
print(r.json())
# POST (run commands with parameters)
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
print(r.json())
# POST (run commands with parameters)
r = requests.post(f'{base}/ip/address/print',
auth=auth, verify=False,
json={'_proplist': ['address', 'interface']})
print(r.json())
This POST example again disables TLS verification while sending authenticated management traffic. Since POST requests may trigger administrative actions, exploitation via MITM could expose credentials and manipulate or observe sensitive operations.
r = requests.post(f'{base}/ip/address/print', auth=auth, verify=False, json={'_proplist': ['address', 'interface']}) print(r.json())