Comments (4)
Have you tried putting the directory in quotes?
from shad0w.
Yes, here's how it doesn't work
shad0w(Administrator@NINJUTSU-OS) ≫ cd "C:\Documents and Settings"
[i] Beacon (5cd2c86b80b78d8a158483817b777e16) received task
Directory Changed to: 'C:\Documents and Settings'
shad0w(Administrator@NINJUTSU-OS) ≫ ls
[i] Beacon (5cd2c86b80b78d8a158483817b777e16) received task
ERROR: Access to the path '.\*' is denied.
while on other dirs it works
shad0w(Administrator@NINJUTSU-OS) ≫ cd C:\Go
[i] Beacon (5cd2c86b80b78d8a158483817b777e16) received task
Directory Changed to: 'C:\Go'
shad0w(Administrator@NINJUTSU-OS) ≫ ls
[i] Beacon (5cd2c86b80b78d8a158483817b777e16) received task
Directory: .\*
Type Created Last Access Length Name
---- ------- ----------- ------ ----
DIR 16/03/2020 05:26 24/09/2020 07:36 .
DIR 16/03/2020 05:26 24/09/2020 07:36 ..
DIR 27/07/2020 11:53 24/09/2020 07:36 api
from shad0w.
This is strange, will have a look into it
from shad0w.
@HashtagMarkus Does C:\Documents and Settings\
actually exist. I looked at this in my test machine and found that cd "C:\Documents and Settings\"
works fine however C:\Documents and Settings
doesn't actually exist. I'm wondering if this is some strange windowism that lets you SetCurrentDirectory without failing but since you aren't actually in a real directory you can't read the contents of the directory which is why the ls call fails.
EDIT: I should have been more specific. C:\Documents and settings
does exist however it isn't a normal directory. It is a junction
and that would probably explain the behavior.
C:\>dir /a
Volume in drive C is Windows 10
Volume Serial Number is C436-9552
Directory of C:\
02/08/2020 06:31 PM <DIR> $Recycle.Bin
02/09/2020 03:16 AM <DIR> $SysReset
02/08/2020 06:39 PM <DIR> BGinfo
09/04/2020 03:10 AM <DIR> Boot
09/27/2018 04:47 AM 394,984 bootmgr
03/18/2017 08:57 PM 1 BOOTNXT
02/09/2020 03:16 AM 8,192 BOOTSECT.BAK
03/23/2017 04:14 PM <JUNCTION> Documents and Settings [C:\Users]
Also since FindFirstFile provide information about the junction itself instead of the destination that would explain why we get the invalid handle when trying to ls the junction
"If the path points to a symbolic link, the WIN32_FIND_DATA buffer contains information about the symbolic link, not the target"
https://devblogs.microsoft.com/oldnewthing/20100212-00/?p=14963
from shad0w.
Related Issues (20)
- Incorrect pading error HOT 14
- Missing beacon.exe HOT 1
- support for linux HOT 1
- IOT devices
- ERROR: Shad0w C2 not working
- Place output in alphabetical order for psh -l
- Computer name corrupt HOT 6
- Most GhostPack modules are broken HOT 1
- Additional packers to consider HOT 1
- Listener crashes HOT 1
- PowerShell modules broken HOT 3
- Feature requests from the Discord channel
- Rename jitter (-j) variable to interval (-i)
- Upload command not working HOT 4
- Assertion failed: jso->_ref_count > 0, file json_object.c, line 192 HOT 10
- Possibility to kill all beacons HOT 1
- shad0w update command not working HOT 1
- Automation HOT 1
- Error installing shadow0w HOT 2
- Python Base64 Issue on command execution HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shad0w.