depthcharge¶
CommandInfo
dataclass
¶
Information about a Depthcharge command.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Name of the command. |
brief |
str
|
Brief summary of the command. |
help |
str
|
Detailed help text for the command. |
dangerous |
bool
|
Whether the command is considered dangerous. |
categories |
List[str]
|
Categories assigned to the command. |
Source code in wintermute/backends/depthcharge.py
519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 | |
CommandRecord
dataclass
¶
A record of a Depthcharge command with metadata.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Name of the command. |
summary |
str
|
Brief summary of the command. |
usage |
List[str]
|
List of usage lines for the command. |
details |
str
|
Detailed help text for the command. |
categories |
List[str]
|
Categories assigned to the command. |
danger |
DangerInfo
|
Danger assessment of the command. |
Source code in wintermute/backends/depthcharge.py
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | |
DangerInfo
dataclass
¶
Information about the danger level of a command.
Attributes:
| Name | Type | Description |
|---|---|---|
severity |
int
|
Severity level of the command (0 = safe-ish, higher = riskier). |
tags |
List[str]
|
List of tags categorizing the danger. |
reason |
str
|
Short explanation of the danger assessment. |
Source code in wintermute/backends/depthcharge.py
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 | |
DepthchargePeripheralAgent
¶
Runs Depthcharge tasks for a provided Peripheral-like object and attaches your Vulnerability objects with ReproductionSteps.
Example
from wintermute.backends.depthcharge import DepthchargePeripheralAgent from wintermute.core import Operation, Device from wintermute.findings import ReproductionStep, Risk, Vulnerability from wintermute.peripherals import UART op = Operation() dev = Device(hostname="test1", architecture="aarch64") test1 = UART(baudrate=115200, comPort="/dev/ttyUSB0") test1.to_dict() dca = DepthchargePeripheralAgent(test1, arch="aarch64") f = dca.catalog_commands_and_flag() [] Expected U-Boot prompt: U-Boot> [] Using default payload base address: ${loadaddr} + 32MiB [] Retrieving command list via "help" [] Reading environment via "printenv" [] Depthcharge payload base (0x01000000) + payload offset (0x02000000) => 0x03000000 [] Version: U-Boot 2022.01 (Jan 10 2022 - 18:46:34 +0000) [] Enumerating available MemoryWriter implementations... [] Available: CpMemoryWriter [] Available: CRC32MemoryWriter [] Excluded: I2CMemoryWriter - Command "i2c" required but not detected. [] Excluded: LoadbMemoryWriter - Host program "ckermit" required but not found in PATH. [] Available: LoadxMemoryWriter [] Available: LoadyMemoryWriter [] Available: MmMemoryWriter [] Available: MwMemoryWriter [] Available: NmMemoryWriter [] Enumerating available MemoryReader implementations... [!] Excluded: CpCrashMemoryReader - Operation requires crash or reboot, but opt-in not specified. [] Available: CRC32MemoryReader [!] Excluded: GoMemoryReader - Payload deployment+execution opt-in not specified [] Excluded: I2CMemoryReader - Command "i2c" required but not detected. [] Available: ItestMemoryReader [] Available: MdMemoryReader [] Available: MmMemoryReader [] Available: SetexprMemoryReader [] Enumerating available Executor implementations... [!] Excluded: GoExecutor - Payload deployment+execution opt-in not specified [] Enumerating available RegisterReader implementations... [!] Excluded: CpCrashRegisterReader - Operation requires crash or reboot, but opt-in not specified. [!] Excluded: CRC32CrashRegisterReader - Operation requires crash or reboot, but opt-in not specified. [!] Excluded: FDTCrashRegisterReader - Operation requires crash or reboot, but opt-in not specified. [!] Excluded: ItestCrashRegisterReader - Operation requires crash or reboot, but opt-in not specified. [!] Excluded: MdCrashRegisterReader - Operation requires crash or reboot, but opt-in not specified. [!] Excluded: MmCrashRegisterReader - Operation requires crash or reboot, but opt-in not specified. [!] Excluded: NmCrashRegisterReader - Operation requires crash or reboot, but opt-in not specified. [!] Excluded: SetexprCrashRegisterReader - Operation requires crash or reboot, but opt-in not specified. [!] No default RegisterReader available. Running runner.commands(detailed=True) to get help output [] Retrieving detailed command info via "help" Parsed 93 commands from help output
Source code in wintermute/backends/depthcharge.py
547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 | |
catalog_commands_and_flag(addVulns=True)
¶
Catalog U-Boot commands via Depthcharge and attach vulnerability if dangerous commands found.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
addVulns
|
bool
|
Whether to attach vulnerabilities for dangerous commands. |
True
|
Source code in wintermute/backends/depthcharge.py
630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 | |
dump_memory_and_attach_vuln(address, length, filename=None)
¶
Dump memory via Depthcharge API and attach vulnerability if successful.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
address
|
int
|
Start address to dump. |
required |
length
|
int
|
Number of bytes to dump. |
required |
filename
|
Optional[str]
|
Optional filename for the dump artifact. |
None
|
Source code in wintermute/backends/depthcharge.py
728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 | |
PeripheralLike
¶
Bases: Protocol
A minimal Protocol for Wintermute Peripheral-like objects.
Attributes:
| Name | Type | Description |
|---|---|---|
device_path |
str
|
Device connection string (e.g., COM port or /dev path). |
workspace |
str
|
Path to the workspace directory. |
name |
str
|
Name of the peripheral/device. |
vulnerabilities |
List[Any]
|
List to store found vulnerabilities. |
Source code in wintermute/backends/depthcharge.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | |