Skip to content

#mkdir is inconsistent #20697

@smcintyre-r7

Description

@smcintyre-r7

The #mkdir post API method behaves inconsistently between session types.

Powershell, Windows and the fall-through mkdir -p all create intermediary directories automatically. The Windows Meterpreter uses CreateDirectoryW which does not, meaning it'll fail if an intermediate directory is missing. Other Meterpreters may or may not handle it in the same way.

Expected behavior

  • It should behave consistently regardless of the session type, shell, powershell, meterpreter, etc.
  • It should be included in our post/test/file tests, like #rm_rf is

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions