Sign In | Sign Up

My Profile

Voodooman
15502
.....
Points: 62
Country: Russia

Shortcuts

Categories

Post

Universal bitcomet user agent spoofer patch by Voodooman
Size: Large, Medium, Small Fri Mar 14, 08 12:38 PM | Category: patch
0

JUST GET IT HERE http://voodooman.gta-action.ru/ 

Маленькое вступление:
Многие пользователи BitComet 0.9x ошибочно считают что их клиент коннектится к Торрентс.ру и подсоединяется к пирам через него, не догадываясь о том что пиры и сиды находятся клиентом через DHT, а не трекер. Потому они не знают правды о том что начиная с версии 0.91 и заканчивая 1.0 бета (и черт знает сколько еще версий с этим недугом впереди) Bitcomet несовместим с torrents.ru и многими другим приватными трекерами так как выдает себя за браузер, а не битторрент клиент.
Так было по сегодняшний день....
:P
Да возрадуйтесь братья ибо явился к вам BitComet мессия с благой вестью!!!
Отныне и навсегда проблема несовместимости (403, tracker respond error и им подобные)  BitComet 0.91-1.0 beta с приватным трекерами, в т.ч. Torrents.ru не актуальна!!!

Устав ждать пол года пока китайские авторы Bitcomet перестанут считать себя самыми умными на планете и нарушать правила битторент,
устав ждать пока они предоставят возможность установки юезр агента вручную или хотябы возможность выбора между битторрент и браузерным юзер агентом,
устав пользоваться старинной 0.70 версией в которой есть не мало глюков устраненных в 0.9х и в которой нет некоторых хороших функций,
устав ждать пока авторы BC поймут что идентификация БК как браузера заставляет срабатывать античит скрипты которые тут же банят клиент,
устав ждать пока админы перестанут банить браузерный юзер агент за мнимую попытку накрутки ратио,
устав видеть как многие любители BitComet переходят на uTorrent, и устав переключаться между 0.70 0.89 и utorrent,
в общем устав от всего этого я вчера скачал свежую бета версию 1.0 в надежде что в ней авторы наконец поступят логично и вернут старый юзер агент...
И когда я запустил ее увидил опять ошибку  403 при подключении к Торрентсу.ру и другим трекерам мое терпение наконец лопнуло! :furious:

Я решил больше не ждать и исправить это досадную "ошибку" самостоятельно.

(вернее не ошибку, а просто упертость авторов в том что они правы что всем нужен браузерный юзер агент для обхода блока со стороны правайдера, без возможности отключения этой функции... притом что на западе в отличии от азии почти ни один приличный провайдер не блокирует торрент трафик, тем более по юзер агенту).
Покопавшись немного в PE 32 теле Bicomet.exe, я нашел все hardcoded user-agent string'и идентифицируешие BC как браузер и сменил их на соответствующие битторрент протоколу BitTorrent 3.4.2 как было в ранних версиях BitComet, после чего запустил модифицированный BitComet и проверил его с нашим славным Torrents.ru и другими трекерами вроде демонойда которые так же банили комету за ее попытку выдать себя за браузер....

Вуаля, никаких 403, никаких ошибок, спокойно подключаюсь к абсолютно любым трекерам!
И так вчера 13.03.08 мной был рожден универсальный эвристический патч для любой версии BitComet... Теоретически для любой, я применил 3 метода поиска и замены нужных байт, первые 2 для поисках и замены полных hardcoded строк c юзер агентом где значения юзер агента должны 1 в 1 соответствовать искомым, и третий метод "умный" на случай если опять авторы биткомет вдруг сменят юзер агент к примеру с IE 6\7 на Googlebot или Safari и предыдущие значения не будут найдены. Суть метода 3 это поиск коротких фрагментов типичных юзер агент значений и замена не полной строки а лишь первых 18 байт дабы вместить BitTorrent/3.4.2.

Люди которые разбираются в теме в этом месте наверно сразу зададутся вопросом  :?: :
"Если ты меняешь первые 18 байт то останутся еще и другие с рудиментом старого юзер агента, не будет ли такой странны юзер агент мешать идентификации клиента, и не сработают ли опять античит скрипты и не забанят ли клиент?"

 

 :!: В теории бана больше не должно быть так как причина кроется именно в Mozilla/4.0, скрипты при обнаружении этого значения тут же дают красный свет и не пускают клиент, а если на его месте стоит BitTorrent/3.4.2 то клиент проходит на ура и дальнейшие значения в юзер агенте не должны парситься ибо для скриптов BitTorrent/3.4.2 уже не браузер (хотя если попадется такой же умный скрипт как мой патч то возможен бан).


Но на практике дело еще лучше  - "BitTorrent/3.4.2" если кто не заметил это всего 16 байт, дополнительные 2 байта это 00 00 separator нужный для того чтобы отсечь продолжение строки юзер агента, то есть не смотря на то что на практике останутся рудименты юзер агента, при считывании значения при загрузки Bitcomet.exe в переменной юзер агента которой оперирует БК окажутся лишь 16 байт BitTorrent/3.4.2... 
Вот так вот spoofing`ом юзерагента в теле приложения делаю то что авторы не могут сделать пол года, хотя реально им бы понадобилось на исправление этой оплошности от силы пол часа.

 

***У меня не было времени проверить заголовки пакетов, есть малая вероятность того что Биткомет можешь считывать значение фиксированной длинны игнорируя сепаратор

 

Тут же я решил попробовать то же самое на Stable 0.99 версии, не столько для себя (я не сомневался что это сработает в любой версии) сколько для скептиков которые без обязательных тестов не поверят в "теоритическую" универсальность метода.


Но тут я не на долго влип, PE 32 тело Bitcomet 0.99 являло собой лоудер PeCompact 2 и все секции былы упакованы "эвристическим методом" что не позволяло патчу работать, я конечно тут же схватился за Ollydbg чтобы "распаковать" БК (правда сначала долго думал что лучше взять в руки Ollydbg Ida pro или SoftIce), за часик неспешной работы и периодических отходов от ноутбука я нашел Entry point сделал хороший дамп, восстановил таблицу импорта,  tls и прочие секции...
но я понимал что далеко не каждый в состоянии вручную распаковать\расшифровать запакованный Bitcomet.exe; писать большую инструкцию по распаковке тоже было бессмысленно все равно бы осуществить распаковку смогли бы от силы 10 из 100, да и лень было этим заниматься и я понимал что этот способ оттолкнет многих новичков своей сложностью, нужно было найти что то полегче для новичков, чтобы пару раз потыкав по кнопкам они могли получить расшифрованный Bitcomet готовый для патчинга.


Совсем уж Простой анпакер для Pecompact я не нашел и в природе его, однако наткнулся на Quick Unpacker который делает все то что я делал вручную в Ollydbg на полуавтомате)) Использовать его легко если знать что делать или если прочитать мою инструкцию (которую так же легче и быстрей написать чем инструкцию по интерактивным дизассемблерам\дебагерам ))

 

 В общем я пока пойду писать инструкцию по применению и подготовлю комплект из моего UniBitComPatch v1.0 и Quick Unpack v2.0 для всех текущих и будущих релизов BС а модераторов трекер сайтов прошу добавить эту благую весть (о том что теперь можно использовать любую версию BC со всеми трекерами без ограничений) в FAQ по BC и так же открепить мой пост в отдельную тему (на которую пологаю будет ссылка в факе) где я собственно уже и выложу патчер и noob - friendly инструкцию по которой пропатчить Bitcomet для совместимости с Torrents.ru сможет даже любой последний ламер.
П.С. - теперь Bitcomet можно убрать из списка несовместимых вот здесь http://torrents.ru/forum/viewtopic.php?t=603810


Link: http://blog.bitcomet.com/voodooman/post_19407/ ©
Add to favorites | Quote Reads (4094) | Comments (9)

CommentsReload

XSTREM Wed Mar 19, 08 03:13 PM

This works perfectly! Thank you very much, v00d00m4n!

I have a question though: Is it possible to make the patch do, so BitComet will announce using the user-agent: "BitComet/(versionNumber)

E.g. if you're using BitComet V. 0.99 - it will report as: "BitComet/0.99" like μTorrent does.

I suppose you've modified the .exe file using a HEX-editor, right?

Good Regards

XSTREM.

The Unofficial BitComet Ambassador. - Your guide, Your allied.
XSTREM Wed Mar 19, 08 03:17 PM

By the way, thanks for mentioning me in the "About" tab. I really appreciate it!

The Unofficial BitComet Ambassador. - Your guide, Your allied.
v00d00m4n (Voodooman) Thu Mar 20, 08 04:55 PM

its possible, i just did it in old school way, because as i know, no torrent trackers baning Bittorrent/3.4.2, when some rare baning user agent with Bitcomet string inside... another reason that patch works for every version and it would be odd if bitcomet 0.99 will have Bitcomet/1.0 user agent or 1.0 will have Bitcomet/0.97 in user agent))

Anyway it makes no sence to change it to Bitcomet/with version#, because user agent isnt used for identification of client)


XSTREM Thu Mar 20, 08 07:29 PM

Actually, that is wrong.

-

The user-agent is used to identify the client on the server. Many tracker owners have banned user-agent BitTorrent 3.4.2 because of exploited clients are using this user-agent.

That is resulting in BitComet is banned on unfair conditions, but the tracker owner can't do anything about it.

-

BitComet should use a user-agent of its own, just like every other popular BitTorrent client does.

-

One incident is the one from TvTorrents.

I'll post the conversation - it'll pretty much speak of its own:

I was advocating with the owner of TvTorrents because of the bannishment of BitComet. We needed some explanations for the ban, here is the response:

"Hi,

Thanks for your interest. I don't ban clients by name, but by what signature they present to the tracker (user-agent) while announcing.

I have not collected one single signature with the word bitcomet in it, but several clients seems to present themselves as Bittorrent/3.4.2. This includes bitlord, bitspirit as wells as old flawed version of bitcomet etc. etc.

I have neither the time nor the inclination to investigate exactly what clients use that signature as I see clients misbehaving that use that signature, my only option is to block it all together. If there was a way to distinguish later more properly working versions and above all, to tell bitcomet apart from bitlord and others, it wouldn't be banned unless it was found to misbehave.

If the signature has been updated, it would pass. But since I hear from so many people that they can't connect with bitcomet, I can only conclude that it still uses the same signature. It SHOULD be unique for each version of the program or at the very minimum per version of the bittorrent library/module.

I can't for the life of me understand why it would use such an old and obselete signature."

The Unofficial BitComet Ambassador. - Your guide, Your allied.
XSTREM Thu Mar 20, 08 07:30 PM

--

And my response to him:

--

"Thank you very much for your reply.

I see the problem, and I have addressed this on the BitComet forums.

BitComet has always used the user-agent: BitTorrent 3.4.2 - it's the standard user-agent, since BitComet has its origins from BitTorrent 3.4.2. However, I agree with you, that the most proper user-agent would be "BitComet".

This is still a problem for BitComet users, but since you can't tell BitComet apart from the "bad" clients, it is hard to do anything about it, I understand that.

I do have an idea for a temporary fix though.

BitComet is very innovative, and one of the latest features is to bypass the ISP restrictions on BitTorrent.

Many users have trouble using BitTorrent, and some are unable to use it. However, BitComet is able to "fool" the ISP to believe that you're using an ordinary browser for the downloading, simply by reporting with user-agent: Mozilla/4.0 (IE Compatible).

Naturally, this has caused some problems on private trackers, since trackers by default blocks browser user-agents. The developers fixed this issue by making BitComet do a "hybrid announce".

If BitComet isn't able to connect the first time, due to the tracker blocks the browser user-agent, BitComet will report with its usual user-agent BitTorrent 3.4.2.

Therefore, if you allowed announces from browser user-agents, BitComet users would be able to continue using this client.

Have a good day!"

The Unofficial BitComet Ambassador. - Your guide, Your allied.
XSTREM Thu Mar 20, 08 07:30 PM

And he responded:

"Hi,

Well, a user-agent should reflect the program and version being used, so

it should be changed with every version.

For example azureus looks like this: Azureus 3.0.4.3;Windows XP;Java

1.6.0_02

So the obvious solution would be for bitcomet to have a proper user-agent.

Allowing user-agents with Mozilla etc, would be a very very bad idea for

a private tracker since someone can extremely easily fake announces by

just typing in the url in their browser. Also trying to "fool" ISPs by

presenting a different user agent seems a little half-assed.

A better way in my opinion would be to use https/ssl for making

announces thus making it impossible for the isp to know what's being

sent. I've been thinking about testing this for awhile but I don't know

if clients in general are able to handle https requests.

I haven't heard of any ISP blocking by useragent, but it seems some ISPs

(aol) block requests that contain the word "info_hash" in the query

string with the idea being to block announces I would assume, but also

happen to block access to a few pages on the site.

Some ISPs block the mime-type of torrents so you can't get them, but

that was easily solved by making them available via https. ISPs behaving

like this are in my opinion on very thin ice, it's as if the police

would stop every car with more than 180hp and giving them a ticket since

it could be used for speeding. If my ISP was doing that I would complain

loudly and ask how they suggest I get my favorite ubuntu distros (for

example).

Regards

Johan"

The Unofficial BitComet Ambassador. - Your guide, Your allied.
XSTREM Thu Mar 20, 08 07:30 PM

"Yes, that would be the proper way to fix this. BitComet should use the user-agent: BitComet.

However, the developers are working hard on improving the new features in BitComet, so this issue isn't a top priority unfortunatly.

Isn't it possible to just unban say BitComet 0.99? I know it uses the user-agent BitTorrent/3.4.2 - and that user-agent is banned on the tracker. I just don't understand then, how some trackers can ban just V. 0.60 for instance and allow all other client versions? Don't they ban the user-agent?

Regarding the browser user-agent: Well, it should work with Chinese ISPs. I can't say if it works with ISPs outside China.

You say: "A better way in my opinion would be to use https/ssl for making

announces thus making it impossible for the isp to know what's being

sent. I've been thinking about testing this for awhile but I don't know

if clients in general are able to handle https requests."

It's funny you mention it, cause a tracker I am associated to has just done this. Yes, the clients handle https requests just fine. However, naturally, it does produce more load on the tracker than with standard HTTP requests"

And his final response:

"Hi,

If they decide to do it, it shouldn't take more than a minute. It's just

a matter of changing a text-string from "Bittorrent/3.4.2" to something

more appropriate.

I have no idea how 0.99 would be allowed and 0.60 could be banned since

as far as I know, they both present themselves identically.

I'll look into installing a certificate to allow https, it shouldn't add

too much load to the servers."

--

As you can read, the user-agent is very important in the identification of the client.

Of course, then every BitComet version would have a patch of its own. I guess we'll have to wait for the developers to fix this.

-

However, thanks again for your work!

-

Best wishes

XSTREM.

The Unofficial BitComet Ambassador. - Your guide, Your allied.
XSTREM Thu Mar 20, 08 07:33 PM

I posted this as a Feature Request on the official forums by the way:

http://forums.bitcomet.com/index.php?showtopic=12791665

The Unofficial BitComet Ambassador. - Your guide, Your allied.
v00d00m4n (Voodooman) Thu Mar 20, 08 07:49 PM

well after that i have idea to change user agent to just BitComet or Bitcomet with fake version number.... like Bitcomet/9.9 surely it will be not banned



TOP