Skip to content

Commit e52edf4

Browse files
committed
Implement feedback from the PR
1 parent 5550e07 commit e52edf4

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

documentation/modules/exploit/windows/misc/ivanti_agent_portal_cmdexec.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
## Vulnerable Application
22
This module leverages an unauthenticated RCE in Ivanti's EPM Agent Portal where a RPC client can invoke a method
33
which will run an attacker-specified string on the remote target as NT AUTHORITY\SYSTEM.
4+
This vulnerability is present in versions prior to EPM 2021.1 Su4 and EPM 2022 Su2.
45

56
## Verification Steps
67

78
1. Install the application
9+
1. Determine which port the vulnerable AgentPortal service is listening on. It has a non-static value.
10+
1. The port used by the AgentPortal service can be found in the registry at `HKLM\SOFTWARE\LANDesk\SharedComponents\LANDeskAgentPortal`
11+
1. Or you could scan for it and probe the high ports (testing suggests it should be in the 49000 - 50000 range).
812
1. Start msfconsole
913
1. Do: `use exploit/windows/misc/ivanti_agent_portal_cmdexec`
1014
1. Set the `RPORT`, `PAYLOAD` and any payload-related options

modules/exploits/windows/misc/ivanti_agent_portal_cmdexec.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def initialize(info = {})
1717
'Description' => %q{
1818
This module leverages an unauthenticated RCE in Ivanti's EPM Agent Portal where a RPC client can invoke a method
1919
which will run an attacker-specified string on the remote target as NT AUTHORITY\SYSTEM.
20+
This vulnerability is present in versions prior to EPM 2021.1 Su4 and EPM 2022 Su2.
2021
},
2122
'Author' => [
2223
'James Horseman', # original poc
@@ -26,6 +27,7 @@ def initialize(info = {})
2627
'License' => MSF_LICENSE,
2728
'References' => [
2829
['CVE', '2023-28324'],
30+
['URL', 'https://forums.ivanti.com/s/article/SA-2023-06-06-CVE-2023-28324?language=en_US'],
2931
['URL', 'https://github.com/horizon3ai/CVE-2023-28324'],
3032
],
3133
'Platform' => 'win',
@@ -34,7 +36,7 @@ def initialize(info = {})
3436
[ 'Automatic', {} ],
3537
],
3638
'DefaultTarget' => 0,
37-
'DisclosureDate' => '2023-06-30', # NVD publish date
39+
'DisclosureDate' => '2023-06-07', # Ivanti article created date
3840
'Notes' => {
3941
'Stability' => [ CRASH_SAFE, ],
4042
'SideEffects' => [ ],
@@ -44,7 +46,7 @@ def initialize(info = {})
4446
)
4547

4648
register_options([
47-
Opt::RPORT()
49+
Opt::RPORT(nil, true, 'The target port is not static. For more info, see this module\'s Verifications Steps in the docs.'),
4850
])
4951
deregister_options('SSL')
5052
end
@@ -54,8 +56,8 @@ def check
5456
return CheckCode::Safe('Command execution failed.') unless cwd.to_s =~ /.:\\Windows\\System32/i
5557

5658
CheckCode::Vulnerable("Command execution test succeeded. Current working directory: #{cwd}")
57-
rescue Rex::SocketError
58-
CheckCode::Safe('MS-NRTP connection failed.')
59+
rescue Rex::SocketError => e
60+
CheckCode::Safe("MS-NRTP connection failed. #{e.class}: #{e.message}")
5961
end
6062

6163
def exploit

0 commit comments

Comments
 (0)