bbot icon indicating copy to clipboard operation
bbot copied to clipboard

Error in /modules/internal/cloudcheck.py: 'property' object has no attribute 'lower'

Open tim-sha256 opened this issue 1 year ago • 7 comments

Describe the bug I installed BBOT v. 2.2.0 via pipx, and on the very first run encountered this error in the printed log in console:

[ERRR] Error in cloudcheck.handle_event((OPEN_TCP_PORT("some website"", module=speculate, tags={'in-scope', 'cdn-bound-method-name-of-class-cloudcheck-providers-cloudflare-cloudflare'}), {})): /Users/user/.local/pipx/venvs/bbot/lib/python3.13/site-packages/bbot/modules/internal/cloudcheck.py:43:handle_event(): 'property' object has no attribute 'lower'
[OPEN_TCP_PORT]     	"some website"	speculate	(cdn-bound-method-name-of-class-cloudcheck-providers-cloudflare-cloudflare, in-scope)

This same error was displayed for each line of the log.

Expected behavior Each line should've been printed out correctly (same as in demo): Screenshot 2024-11-24 at 10 21 29

BBOT Command `bbot -t tesla.com -p subdomain-enum'

OS, BBOT Installation Method + Version OS: Mac OS 15.0, Installation method: pipx, BBOT version: 2.0.2

Bug fix I fixed the bug for myself and it works perfectly fine now. in "cloudcheck.py" on line 43 there's currently: provider_name = provider.name.lower().

If you just replace it with:

provider_name = str(provider.name).lower(), it works perfectly fine!

tim-sha256 avatar Nov 24 '24 09:11 tim-sha256

What is your python version?

TheTechromancer avatar Nov 24 '24 15:11 TheTechromancer

Possible cause:

https://github.com/python/cpython/issues/101860

TheTechromancer avatar Nov 24 '24 15:11 TheTechromancer

In this venv I had Python 3.8.5 by default.

tim-sha256 avatar Nov 24 '24 19:11 tim-sha256

Hmm that's strange because BBOT doesn't support python 3.8. It's not clear if that's the problem or not, but I'm curious to track it down because that value should never be anything other than a string:

https://github.com/blacklanternsecurity/cloudcheck/blob/9033994d601cade079b0ec01958b239e7ed9248f/cloudcheck/providers/base.py#L160-L162

TheTechromancer avatar Nov 25 '24 16:11 TheTechromancer

That's strange. If you have any idea on what to test / check / send here - please let me know. I'm not that experienced with Python, so I'm not sure if I can identify the problem myself.

Here's some additional general info about version that maybe could help: pipx --version 1.7.1 python3 --version Python 3.12.4 python --version Python 3.8.5 user$ echo $PATH /usr/local/opt/postgresql@16/bin:/usr/local/bin:/usr/local/bin/python3.12:/Users/user/Library/Android/sdk/platform-tools:/Users/user/Library/Android/sdk/tools:/opt/anaconda3/bin:/opt/anaconda3/condabin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Users/user/.local/bin

tim-sha256 avatar Nov 27 '24 14:11 tim-sha256

I was able to reproduce this by installing BBOT v2.2.0 via pip. The problem looks to be a conflict with an OS-level python package. If I install the same version with pipx, it runs without any error.

Is it possible you installed bbot via pip at some point, and your bbot executable is still pointing to the old one?

TheTechromancer avatar Nov 27 '24 16:11 TheTechromancer

no, I definitely installed it with pipx, because when I ran "pip install bbot" I've received an error "ERROR: No matching distribution found for bbot". Then I tried pipx install bbot instead, and found out I don't have pipx. So I brew install pipx and then repeated pipx install bbot - and it started working.

tim-sha256 avatar Dec 03 '24 00:12 tim-sha256