BC-SECURITY / Empire

Empire is a post-exploitation and adversary emulation framework that is used to aid Red Teams and Penetration Testers.
https://bc-security.gitbook.io/empire-wiki/
BSD 3-Clause "New" or "Revised" License
4.21k stars 575 forks source link

v5.11.5 into main #750

Closed vinnybod closed 1 week ago

vinnybod commented 1 week ago

This PR was automatically generated by the release-public-start workflow. This PR should be merged with a merge commit, not a squash commit. Merging this PR will trigger a tag and release automatically.

github-actions[bot] commented 1 week ago

Coverage

Coverage Report
FileStmtsMissCoverMissing
empire/server
   server.py1303573%58–60, 63–66, 95, 99, 117–123, 132–133, 140–143, 154–157, 167, 175, 180, 184–185, 197–215
empire/server/api
   app.py1062477%25–27, 31, 36–43, 60–66, 91–97, 159, 164–174
   jwt_auth.py711086%53, 55, 57, 66, 84, 86–87, 90, 101, 112
   middleware.py12283%39–40
empire/server/api/v2
   shared_dto.py60395%68, 84, 90
empire/server/api/v2/agent
   agent_api.py50198%88
   agent_file_api.py34197%72
   agent_task_api.py1812288%113–137, 204, 280–281, 313, 322, 339, 360, 389, 404, 423, 440, 457, 476, 495, 518, 533, 547, 562, 568
empire/server/api/v2/download
   download_api.py37197%57
empire/server/api/v2/listener
   listener_api.py59493%85, 90, 104, 116
   listener_dto.py48296%303, 306
   listener_template_api.py18194%47
empire/server/api/v2/obfuscation
   obfuscation_api.py68199%132
empire/server/api/v2/plugin
   plugin_task_api.py44491%81–101, 163
empire/server/api/v2/profile
   profile_api.py46296%61, 76
empire/server/api/v2/stager
   stager_dto.py44295%222, 225
   stager_template_api.py18194%44
empire/server/api/v2/tag
   tag_api.py36197%77
empire/server/api/v2/user
   user_api.py67593%60, 83–85, 136, 160
empire/server/api/v2/websocket
   socketio.py924749%34–39, 42–46, 50–62, 66–68, 80–85, 101–106, 123–128, 140–143, 155, 158, 161, 166
empire/server/common
   agents.py71258118%103–108, 122, 137–143, 165–203, 210–220, 226–235, 270–321, 325–332, 338–386, 393, 422–435, 448–464, 470–482, 493–506, 512–525, 531–547, 627–677, 706–721, 727–730, 742–760, 766–773, 798–1065, 1081–1155, 1165–1225, 1234–1280, 1317–1350, 1356–1365, 1369–1427, 1432–1446, 1451, 1454–1476, 1479–1480, 1485, 1489–1490, 1507, 1521–1767
   credentials.py443032%39–52, 61–122, 130–161
   encryption.py16711134%42–44, 48, 57–59, 67–68, 77–81, 96–108, 112–117, 124–125, 133–142, 149–156, 164–170, 177–191, 198–202, 209–210, 240, 264–285, 291–306, 312–323, 329, 335, 342, 353–355, 361–374, 380
   helpers.py34817849%84–88, 95–96, 111, 194–195, 235, 242–244, 390–424, 434–560, 581, 588–598, 611–621, 626–630, 633–642, 656–664, 670–671, 673–674, 676–677, 700, 712–713, 735–737, 744, 767, 770–772, 775–777, 784–786
   listeners.py8275%15–20
   packets.py1127533%160, 181–186, 211–248, 256–294, 321–370, 422–425
   plugins.py18383%28, 33, 38
   pylnk.py59044225%202, 206, 210, 214, 218–223, 227–235, 239–243, 247–251, 255–263, 267, 271, 275, 279, 284–287, 291–292, 296–301, 305–311, 315, 319–327, 337–338, 342–344, 364–366, 369–370, 375–378, 383, 386–388, 391, 394–399, 402, 407, 410–414, 419–452, 455–457, 473, 478–485, 488, 493, 498–526, 529–537, 542–556, 559–594, 599, 604–612, 615–634, 637–640, 643–650, 655, 660–688, 693–716, 719–734, 737–753, 756–789, 792–820, 823, 826–827, 832, 835–837, 842, 845–846, 851, 854–855, 860, 863–864, 869, 872–873, 878, 881–882, 887, 890–894, 899, 904–926, 933–935, 939–954
   socks.py433030%12–13, 17–19, 25–31, 35–42, 46–57, 60
   stagers.py35429317%27–28, 55–63, 93, 100–101, 118, 131, 152–153, 161–181, 189–204, 212–248, 256–276, 284–298, 305–346, 352–401, 409–564, 568–638, 641–677, 680–690, 693–788, 792–804
   templating.py30970%61–63, 72–74, 83–85
empire/server/common/malleable
   implementation.py2362689%162, 164, 347, 351, 356, 476–495, 527
   profile.py1271787%103–104, 144–145, 154, 195, 206, 220, 226, 237, 250, 261, 293, 316–319
   transaction.py3748079%167–186, 199, 214–218, 261, 270, 286–290, 294, 304, 353, 404, 430, 441–442, 448, 469–497, 606–612, 631, 644–646, 753–760, 773, 784, 879, 881, 892, 894, 896
   transformation.py37312168%184, 186, 188, 213, 224–225, 227, 235–236, 238, 284, 290, 294, 325–351, 356–396, 404–441, 456, 467–468, 470, 478–479, 481, 683, 685, 687, 689, 699–700, 724–728, 732, 736, 760, 773, 778, 790, 792–794, 796, 811, 813–815, 817, 835–840, 856, 861, 877–884, 900, 905
   utility.py431370%29, 45–48, 60–66, 120, 128
empire/server/core
   agent_service.py1011684%81, 84, 87, 136, 162–180, 195
   agent_task_service.py1903681%66–69, 85, 87, 93, 96, 99, 107, 109, 111, 116, 121, 141–146, 175, 206–209, 221, 226–229, 237, 239, 268–285, 373–381
   bypass_service.py65494%31, 37, 60–61
   config.py97694%123–126, 135–136
   credential_service.py49394%32–33, 41
   download_service.py972277%45, 51, 57, 61, 67–70, 73, 93, 95, 97, 99, 104, 109, 130–141
   hooks.py67888%77–79, 88–90, 124, 127
   hooks_internal.py1156643%29, 32, 42–46, 115–145, 155–190, 203–222, 232–256
   listener_service.py1863084%67, 108, 136–137, 146, 156, 166–168, 191–194, 244–253, 274, 284–286, 289–293, 324–328
   module_models.py74889%84–95, 99–101
   module_service.py37010572%97, 133, 146, 154–158, 162, 169–173, 177–207, 223–268, 347–349, 360, 364, 376–386, 413, 434, 436, 501–524, 527–529, 540–542, 586–587, 604, 618, 627, 631–633, 657, 677–695, 703–704, 722, 754
   obfuscation_service.py1391788%95–97, 108, 121, 126–128, 145–149, 156–159, 233, 251–254
   plugin_service.py1852785%63, 98–99, 103–104, 120–121, 135, 177, 183–187, 275–278, 294, 300, 303, 306, 314, 316, 318, 323, 328
   profile_service.py61297%41, 85
   stager_service.py98595%53, 88, 130, 135, 158
   stager_template_service.py47198%57
   tag_service.py711776%45, 47, 49, 51, 53, 55, 59–62, 65, 68, 76–79, 84, 87
   user_service.py41295%15, 50
empire/server/core/db
   base.py891880%27–29, 37–42, 60, 74–83, 159–165
   defaults.py44686%87–92, 100–101
   models.py3001097%262–266, 278, 281, 329, 353, 356, 420, 423
empire/server/listeners
   dbx.py44635820%143, 150–161, 183–184, 207–211, 230, 241–245, 280, 289, 300–303, 326–327, 333–345, 355, 360–363, 365, 380–485, 499–584, 592–644, 695–1001, 1010–1016, 1022–1025
   http.py53833737%231–234, 275, 288, 296–307, 318–321, 342–349, 384, 394–396, 424–427, 435–436, 445–459, 469, 474–479, 483–516, 531–532, 547–602, 626, 630, 633–635, 641–644, 659–660, 672–696, 700, 722, 725–732, 743–744, 777–780, 788–1216
   http_com.py36628522%165–166, 173–187, 208–209, 229–234, 243–246, 276–283, 289, 307, 316, 338–421, 435–478, 486–512, 518–824, 831–837, 843–846
   http_foreign.py1687058%141, 148–153, 175–178, 197–201, 212, 224–226, 233–238, 244–247, 275, 284, 292, 296–299, 323–324, 336–352, 362, 367–372, 375–378, 393–394, 403–404, 412–452, 458, 464
   http_hop.py23314339%99, 106, 128–129, 147–151, 161, 173–175, 182–187, 222, 231, 241, 249–252, 280–281, 290–303, 313, 318–321, 324–327, 342–465, 474–475, 483–523, 531–575, 581
   http_malleable.py62446725%163–164, 191, 239, 246–251, 277–278, 296–302, 358, 368–371, 378–389, 399, 408, 418–423, 430, 458–459, 463, 472–473, 484–500, 537–539, 546, 554, 559–564, 567–570, 585–708, 722–804, 813–1301, 1309–1694
   onedrive.py37730918%158, 161–191, 210–211, 223–227, 247–249, 255–260, 279, 287, 295, 311–371, 378–415, 429–472, 475–870, 877–883, 889–892
   port_forward_pivot.py37026728%75–76, 82, 104–105, 124–128, 139, 151–154, 161–172, 183–186, 210–218, 234, 243, 253, 257–260, 290–294, 300–301, 313–329, 339–342, 347–350, 353–387, 402–513, 527–615, 624–664, 672–836, 843–933
   smb.py20718113%67–68, 74, 93–220, 235–300, 314–363, 372–406, 414–470, 477
empire/server/modules/bof
   clipboard_window_inject.py221627%16–50
   nanodump.py55509%14–84
   secinject.py221627%16–50
   tgtdelegation.py10460%16–22
empire/server/modules/bof/situational_awareness
   netGroupList.py8362%14–19
   netGroupListMembers.py8362%14–19
   netLocalGroupList.py8362%14–19
   netLocalGroupListMembers.py8362%14–19
   netloggedon.py8362%14–19
   netshares.py8362%14–19
   windowlist.py9456%14–21
   wmi_query.py9456%14–21
empire/server/modules/csharp
   Assembly.Covenant.py191332%16–45
   AssemblyReflect.Covenant.py191332%16–45
   Inject_BOF.Covenant.py291934%23–63
   ProcessInjection.Covenant.py695914%3–4, 24–126
   Shellcode.Covenant.py221627%16–48
   ThreadlessInject.Covenant.py615116%7–8, 27–120
empire/server/modules/powershell/code_execution
   invoke_ntsd.py544811%15–97
   invoke_reflectivepeinjection.py322425%19–62
   invoke_shellcode.py20385%34–35, 41
   invoke_shellcodemsil.py15940%16–38
empire/server/modules/powershell/collection
   SharpChromium.py261638%22–48
   WireTap.py181044%18–34
   get_sql_column_sample_data.py393315%15–70
   minidump.py191142%18–34
   packet_capture.py171229%14–31
   screenshot.py221627%16–43
empire/server/modules/powershell/credentials
   credential_injection.py352529%20–70
   tokens.py292128%18–65
empire/server/modules/powershell/credentials/mimikatz
   dcsync_hashdump.py211529%16–42
   golden_ticket.py342526%21–66
   lsadump.py15940%16–34
   mimitokens.py342818%16–58
   pth.py342526%21–64
   silver_ticket.py393121%18–73
   trust_keys.py14843%16–31
empire/server/modules/powershell/exfiltration
   PSRansom.py241825%16–46
empire/server/modules/powershell/exploitation
   exploit_eternalblue.py171135%16–37
empire/server/modules/powershell/lateral_movement
   inveigh_relay.py322619%16–81
   invoke_dcom.py332718%16–80
   invoke_executemsbuild.py524513%17–108
   invoke_psexec.py352917%16–82
   invoke_psremoting.py413417%17–92
   invoke_smbexec.py373116%16–88
   invoke_sqloscmd.py443716%16–80
   invoke_sshcommand.py312423%17–64
   invoke_wmi.py463915%17–101
   invoke_wmi_debugger.py574914%17–157
   jenkins_script_console.py251828%17–58
   new_gpo_immediate_task.py332621%17–93
empire/server/modules/powershell/management
   invoke_bypass.py13746%15–23
   invoke_script.py181233%15–32
   logoff.py10550%14–21
   psinject.py332718%16–72
   reflective_inject.py423419%18–84
   runas.py332621%17–71
   shinject.py292224%17–61
   spawn.py262023%16–68
   spawnas.py443716%17–72
   switch_listener.py14843%16–35
   user_to_sid.py7271%14–18
empire/server/modules/powershell/management/mailraider
   disable_security.py231726%15–59
   get_emailitems.py161038%15–39
empire/server/modules/powershell/persistence/elevated
   registry.py645612%19–157
   schtasks.py787010%19–197
   wmi.py87799%19–251
   wmi_updater.py736511%19–214
empire/server/modules/powershell/persistence/misc
   add_sid_history.py15940%16–33
   debugger.py352917%16–108
empire/server/modules/powershell/persistence/powerbreach
   deaduser.py372922%18–138
   eventlog.py342624%18–115
   resolver.py372922%18–124
empire/server/modules/powershell/persistence/userland
   backdoor_lnk.py484017%19–112
   registry.py746611%19–197
   schtasks.py756711%19–190
empire/server/modules/powershell/privesc
   ask.py201430%16–61
   bypassuac.py221627%16–54
   bypassuac_env.py231726%16–54
   bypassuac_eventvwr.py231726%16–55
   bypassuac_fodhelper.py231726%16–55
   bypassuac_sdctlbypass.py231726%16–55
   bypassuac_tokenmanipulation.py282029%19–57
   bypassuac_wscript.py221627%16–54
   ms16-032.py181233%16–46
   ms16-135.py181233%16–46
empire/server/modules/powershell/privesc/powerup
   service_exe_stager.py302420%16–61
   service_stager.py251924%16–52
   write_dllhijacker.py262023%16–67
empire/server/modules/powershell/recon
   fetch_brute_local.py251924%15–42
   find_fruit.py221627%16–57
   get_sql_server_login_default_pw.py221723%14–44
empire/server/modules/powershell/situational_awareness/host
   computerdetails.py464013%16–104
empire/server/modules/powershell/situational_awareness/network
   get_sql_server_info.py292417%14–58
empire/server/modules/powershell/situational_awareness/network/powerview
   get_gpo_computer.py383118%18–95
   get_subnet_ranges.py352820%17–78
empire/server/modules/python/collection/osx
   imessage_dump.py151033%14–176
   native_screenshot_mss.py11555%16–20
   prompt.py14936%14–43
   search_email.py12192%19
   sniffer.py231822%14–151
empire/server/modules/python/lateral_movement/multi
   ssh_launcher.py171135%15–32
empire/server/modules/python/management/multi
   spawn.py13746%16–28
empire/server/modules/python/management/osx
   shellcodeinject64.py17947%18–136
empire/server/modules/python/persistence/multi
   desktopfile.py14843%15–28
empire/server/modules/python/persistence/osx
   CreateHijacker.py201335%23–44
   LaunchAgent.py211433%17–53
   LaunchAgentUserLandPersistence.py161038%15–47
   loginhook.py12742%14–20
   mail.py292128%18–131
empire/server/modules/python/privesc/multi
   CVE-2021-3560.py16944%18–41
   CVE-2021-4034.py211338%19–47
   bashdoor.py11645%15–27
   sudo_spawn.py181233%16–37
empire/server/modules/python/privesc/osx
   dyld_print_to_file.py171041%24–39
   piggyback.py171135%16–35
empire/server/modules/python/situational_awareness/host/osx
   situational_awareness.py14936%14–196
empire/server/plugins/ChiselServer-Plugin
   chiselserver.plugin1017130%66–71, 89–184
empire/server/plugins/Report-Generation-Plugin
   advanced_reporting.plugin14710727%67–111, 134–151, 155–176, 179–188, 191–201, 204–220, 227–259, 262–276, 282–285, 298–300
   mitre.py1248531%17–18, 21, 24, 28, 31–40, 44–58, 62–65, 69–71, 74–75, 78–80, 84–103, 106–107, 110–111, 114–115, 118–119, 124–128, 131–135, 138, 143, 146–147, 155–156, 165–181, 189–201, 209, 217–225, 236–237, 245–259, 262–272, 275
empire/server/plugins/SocksProxyServer-Plugin
   socksproxyserver.plugin13610424%83–88, 103–122, 125–130, 137–141, 146–177, 180–188, 191–214, 217–232
empire/server/plugins/basic_reporting
   basic_reporting.py745131%43–74, 86–95, 100–109, 114–126, 142–146
empire/server/plugins/csharpserver
   csharpserver.py15110828%54–70, 78–122, 125–153, 156–167, 170–195, 198–223, 234–238
empire/server/plugins/example
   example.py30300%3–111
empire/server/plugins/reverseshell_stager_server
   reverseshell_stager_server.py1098522%122–128, 131, 146–209, 214, 217–226, 229–245, 248–261
empire/server/plugins/websockify_server
   websockify_server.py543143%67–74, 77, 92–125
empire/server/stagers/multi
   bash.py221436%67–91
   generate_agent.py372922%90–138
   launcher.py34682%116–124, 147–148
   macro.py514120%120–196
   pyinstaller.py51688%100–102, 113–114, 143
   war.py443423%91–182
empire/server/stagers/osx
   applescript.py181044%62–81
   application.py251636%81–105
   ducky.py251828%60–88
   dylib.py251732%73–99
   jar.py171041%60–78
   macho.py171041%60–80
   macro.py393121%85–182
   pkg.py271930%72–105
   safari_launcher.py221532%67–92
   shellcode.py231630%68–157
   teensy.py76699%61–143
empire/server/stagers/windows
   backdoorLnkMacro.py14712813%151–158, 162–481
   bunny.py483919%107–176
   cmd_exec.py453424%105–162, 165–177
   csharp_exe.py484017%102–168
   dll.py401172%107–108, 112, 115–118, 121–132, 156–157
   ducky.py423419%94–161
   hta.py372922%86–145
   launcher_bat.py51982%90–91, 110, 125–135, 145–146
   launcher_lnk.py382924%118–180
   launcher_sct.py524415%96–174
   launcher_vbs.py342624%82–138
   launcher_xml.py837510%82–191
   macro.py791976%159, 163, 166–177, 200–201, 227–239
   ms16-051.py342624%95–149
   nim.py514218%83–168
   reverseshell.py221245%61–65, 68–84
   shellcode.py574619%5–6, 107–181
   teensy.py1131057%82–218
   wmic.py423419%96–159
empire/server/utils
   data_util.py48981%34–43, 56–57, 59, 63
   file_util.py26196%28
   listener_util.py281064%13–19, 97–108
   log_util.py51786%41–43, 46–49
   math_util.py5340%9–11
   option_util.py741876%97, 117–131, 140–148, 158
TOTAL17670933647% 

Tests Skipped Failures Errors Time
347 0 :zzz: 0 :x: 0 :fire: 11m 28s :stopwatch: