proone-mkcdict
Tool for building binary credential dictionaries from text files.Overview
proone-mkcdict compiles text-based credential lists into an optimized binary format used by the BNE worker for brute-force attacks.Usage
Arguments
<cred file>: Path to text file with credentials (use-for stdin)<out file>: Path to output binary file (use-for stdout)
Input Format
Each line in the credential file follows:<WEIGHT>: uint8_t value (0-255) indicating priority<ID>: Username (case-sensitive)[PW]: Password (case-sensitive, optional)
Format Notes
- Lines starting with
#are comments (ignored) - Empty lines are ignored
- Whitespace between fields can be tabs or spaces
- Usernames and passwords are case-sensitive
- Higher weight values indicate higher priority
Example Input File
Weight System
Weights determine credential priority:- 128-255: Critical/most common credentials
- 64-127: High priority credentials
- 32-63: Medium priority credentials
- 16-31: Low priority credentials
- 1-15: Rare/specific credentials
Output Format
The tool generates a binary format:- Serialized credential entries
- Optimized for fast loading
- Includes weight metadata
- Null-terminated strings
Binary Structure
Internal format (implementation detail):- Entry count
- Weight values
- String offset table
- String data pool
Validation
After building, the tool:- Deserializes the binary
- Verifies all entries are correct
- Reports errors if validation fails
Debug Output
With debug builds (PRNE_DEBUG=1 and PRNE_VERBOSE>=3):
Terminal Safety
The tool refuses to write binary output to a terminal:Exit Codes
| Code | Description |
|---|---|
| 0 | Success |
| 1 | Runtime error (I/O, parsing, validation) |
| 2 | Invalid arguments |
Error Messages
Parse Errors
- Invalid weight value (not 0-255)
- Missing username
- Malformed line
Validation Errors
Example Usage
Integration
The output binary is used by:- proone-bne: Direct testing tool
- proone-mkdvault: Embedded in DVault
- proone: Runtime credential dictionary
Best Practices
Weight Assignment
- Use 128+ for known common credentials
- Use 64-127 for manufacturer defaults
- Use 32-63 for common patterns
- Use 16-31 for less common credentials
- Use 1-15 for specific/targeted credentials
Credential Collection
- Include manufacturer defaults
- Add common patterns (admin/admin, root/root)
- Consider empty passwords
- Include username-as-password combinations
- Research specific device types
File Organization
- Group by device type or manufacturer
- Comment credential sources
- Keep weights consistent within groups
- Document rationale for unusual credentials
Security Considerations
- Store credential files securely
- Limit access to binary dictionaries
- Rotate dictionaries periodically
- Monitor effectiveness and update
Source
Location:src/proone-mkcdict.c
Sample file: src/data/cred_dict.sample.txt