Giter Club home page Giter Club logo

masto's Introduction

Masto OSINT Tool

Masto_logo


Code style: black security: bandit MIT License HitCount contributions welcome PyPI version


๐Ÿ˜ About Masto

Masto provides information/intelligence on Mastodon.social users and fediverse instances (servers).
Masto OSINT Tool has been added as a Python package on PyPI --> https://pypi.org/project/masto/


๐Ÿš€ Masto capabilities

Masto OSINT Tool helps to:

  • Find user ID
  • Find exact username match across instances (the tool currently pulls many accounts with the username OSINT, whereas the mastodon.social (browser search bar) returns one result, as well as returning unreliable results, such as accounts that only start with osint
  • Find all accounts belonging to a user without logging in to Mastodon (Mastodon requires users to log in and after 5 results you get: 401 Search queries pagination is not supported without authentication
  • Find username correlation (can't be found by browser)
  • Check if the user is a bot
  • Check if the account is a group
  • Check if the account is locked
  • Check if the user opted to be listed on the profile directory
  • Get avatar link with an additional choice of opening the avatar within your browser
  • Get profile creation date
  • Get number of followers & following
  • Get number of posts
  • Get user last status date
  • Get user's bio

Additional instance (server) feature

This is a nice feature, if you type social.network.europa.eu on Mastodon.social , you won't get a result as the instance is set to not discoverable.

This function helps to:

  • Get information on an instance
  • Get instance Admin ID
  • Get instance email
  • Get a short description
  • Get server thumbnail link
  • Get instance creation date
  • Get instance language used
  • Get instance admin count of followers and following
  • Get instance admin last status date
  • Get header image link and avatar link
  • Get instance display name
  • Get admin url
  • Get admin avatar
  • Check if instance admin account is locked
  • Check if registration is required and if the admin needs to approve the request
  • Check if the admin is a bot

Masto Workflow



๐Ÿ› ๏ธ Installation

Using PyPI

https://pypi.org/project/masto/

pip install masto==2.0.5


Using GitHub

git clone https://github.com/C3n7ral051nt4g3ncy/Masto.git
cd masto
python3 setup.py install

๐Ÿ‘จโ€๐Ÿ’ป Usage

  • Help: masto -h

  • Search for user masto -user {username}

  • Search for instance masto -instance {instance_name}


โญ Tool use cases

Use case 1 Searching for a user and bypassing the profile directory opt-out
  • Tried searching via browser both terms Webbreacher and @Webbreacher 1 result --> @[email protected]
  • Searched Webbreacher on Masto: 3 results --> โœ… 3 accounts found
  • On the counter.social profile, @Webbreacher's settings are --> user opted to be on the profile directory = False, this is why the browser search didn't find the counter.social profile!

๐Ÿช„ Masto successful outcome: Masto found all 3 accounts.



Use case 2 Searching without getting a 401 error
  • Many people don't want an account on Mastodon, and if you don't have an account, you can search on Mastodon, but you will only get 5 results.
  • Clicking on load more will give you a 401 error and request for the user to log in.

๐Ÿช„ Masto successful outcome: You can use Masto without logging in to Mastodon, you won't get a 401 error.



Use case 3 Getting information on locked instances:
  • Tried searching for the instance 0sint.social, there isn't much information via a browser search because it's locked.

๐Ÿช„ Masto successful outcome: Masto found more information on the instance and on the admin, including email address.



Use case 4 Conducted a username search for Defcon:
  • Conducted a search with Masto for the username defcon, the Mastodon API returned 2 user accounts.

๐Ÿช„ Masto successful outcome: Masto OSINT Tool picked up after the initial API search by doing a full scan and found 4 accounts.


๐Ÿ˜ Mastodon.social understanding

The same username can be found across different instances(servers):

  • example: @[email protected] | @[email protected] | @[email protected]
  • Finding the same username on different instances does not prove it's the same person behind each account.
  • Each instance can only have one unique username in the server. Tip: verify your account with the <a rel="me" attribute which confirms you are behind the account, and will help avoid or detect impersonators.

๐Ÿ‘ค Testing on known users and instances

  • For a username test, try: python3 masto.py -u Gargron, the founder of Mastodon.social, this pulls a wopping 11 accounts!!! (keep in mind that the same username doesn't prove the 11 accounts belong to @Gargron {Gargron is the Mastodon Dev}).
  • For an instance test, try: python3 masto.py -i social.network.europa.eu

โšช Mastodon API reliability issues

  • You may know of a valid user & have the link to the user's profile, you input the username on Masto but get no result.
  • I asked the Mastodon Team about this api issue, they replied:

There is no global search, the server will reply with what it knows about. If it has not encountered the account, it will not return it in search results.

  • ๐ŸŸข Masto v2.0 fixes this, the scan of Masto's own json instances list comes in support of Mastodon's API and picks up on things the API missed.
  • v2.0 is 100% reliable if the server is listed in the Masto fediverse_instances.json file.
  • This fix is thanks to @Webbreacher who suggested this feature.

Community mentions about Masto


๐Ÿ™ Thanks!

Huge thanks to @EduardSchwarzkopf for all his contributions to Masto OSINT Tool.

Thanks to @Webbreacher for his input, help and ideas. I learn a great deal from him, and he is a great instructor & inspiring person.

Thanks to sthierolf for contributing

Thanks to @Roman-Kasianenko for his help.


๐Ÿ“ License

MIT License
Tool made for the OSINT and Cyber community, feel free to contribute code .

masto's People

Contributors

c3n7ral051nt4g3ncy avatar eduardschwarzkopf avatar sthierolf avatar webbreacher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

masto's Issues

pick own instances

How about I'll add a function, that can do a generic search based on the user's input?
e.g. instead of going one by one function, you can decide what instances you want to search.
Maybe also an array option with multiple instances for the same username?

Issue with crackmapexec?

Hi there,

I just tried to install Maso. It appears to be working, yet it throws some errors in regards to crackmapexec. Any idea why?

I am on Kali rolling release 2022.3

Thanks!


Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: requests in /home/kali/.local/lib/python3.10/site-packages (from -r requirements.txt (line 1)) (2.28.1)
Collecting bs4
  Downloading bs4-0.0.1.tar.gz (1.1 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: tqdm in /usr/lib/python3/dist-packages (from -r requirements.txt (line 3)) (4.64.0)
Requirement already satisfied: urllib3 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 4)) (1.26.12)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests->-r requirements.txt (line 1)) (2022.6.15)
Requirement already satisfied: idna<4,>=2.5 in /home/kali/.local/lib/python3.10/site-packages (from requests->-r requirements.txt (line 1)) (2.10)
Requirement already satisfied: charset-normalizer<3,>=2 in /usr/lib/python3/dist-packages (from requests->-r requirements.txt (line 1)) (2.0.6)
Requirement already satisfied: beautifulsoup4 in /usr/lib/python3/dist-packages (from bs4->-r requirements.txt (line 2)) (4.11.1)
Building wheels for collected packages: bs4
  Building wheel for bs4 (setup.py) ... done
  Created wheel for bs4: filename=bs4-0.0.1-py3-none-any.whl size=1257 sha256=190828e2b249040977a46e1dedb8e40e67b40224fdee179c8414cc0481b9a788
  Stored in directory: /home/kali/.cache/pip/wheels/e4/62/1d/d4d1bc4f33350ff84227f89b258edb552d604138e3739f5c83
Successfully built bs4
Installing collected packages: bs4
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
crackmapexec 5.2.2 requires impacket<0.10.0,>=0.9.23, but you have impacket 0.10.0 which is incompatible.                                                                                                                   
crackmapexec 5.2.2 requires neo4j<5.0.0,>=4.1.1, but you have neo4j 1.7.0.dev0 which is incompatible.                                                                                                                       
crackmapexec 5.2.2 requires pylnk3<0.4.0,>=0.3.0, but you have pylnk3 0.4.2 which is incompatible.                                                                                                                          
crackmapexec 5.2.2 requires xmltodict<0.13.0,>=0.12.0, but you have xmltodict 0.13.0 which is incompatible.                                                                                                                 
Successfully installed bs4-0.0.1   ```

Username (or Mastodon handle) including _ (underscore) throw error

Thanks for this tool and I would like to report the following error:

Handles including _ (underscore) throw error.
I have 4 bots running containing _ in their names (marked as bots, fetching RSS feeds)
By looking up for this username, I got the following error thrown:

Input username WITHOUT the @ symbol in front!
Username: [email protected]
Traceback (most recent call last):
  File "/home/toor/Masto/masto.py", line 375, in <module>
    main()
  File "/home/toor/Masto/masto.py", line 368, in main
    mastodon_search()
  File "/home/toor/Masto/masto.py", line 156, in mastodon_search
    data = json.loads(response.text)
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.