Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Announcement #4

Open
Zegorax opened this issue Apr 9, 2020 · 39 comments
Open

Announcement #4

Zegorax opened this issue Apr 9, 2020 · 39 comments
Labels
help wanted Extra attention is needed

Comments

@Zegorax
Copy link
Owner

Zegorax commented Apr 9, 2020

OnlyOffice removed the license code in https://github.com/ONLYOFFICE/server/blob/a3b4517ab4881458c13b44629c0acbaab5855b09/Common/sources/license.js . I think they are implementing countermeasures for this script to work.

Please pay attention to your installations.

@mhaluska
Copy link

mhaluska commented Apr 9, 2020

So easier decision to migrate to another (free!) solution ;-)

@Zegorax
Copy link
Owner Author

Zegorax commented Apr 9, 2020

If you have one that has better performances than Collabora or LibreOffice online, I would gladly take suggestions :)

@mhaluska
Copy link

mhaluska commented Apr 9, 2020

In this case you're right, there is no "free" solution with performance like OnlyOffice.

@Zegorax
Copy link
Owner Author

Zegorax commented Apr 9, 2020

Okay thanks anyway! So I had a look at the new OO build, and they removed the public key from docservice. If someone is motivated to reverse engineer it with me, just PM me on Twitter @Zegorax and we can look trough it together

@y0grt
Copy link

y0grt commented Apr 11, 2020

This tag still works:
docker pull onlyoffice/documentserver-ie:5.5.0.165

@Zegorax
Copy link
Owner Author

Zegorax commented Apr 11, 2020

Yes this tag works, but it is sad not to have updates. That's why I'm trying to reverse engineer it again. I just don't have the time right now

@Zegorax Zegorax mentioned this issue Apr 13, 2020
@D3nnis3n
Copy link

Just wanting to say thanks for your work and to motivate you. What they did is a fully ass-hat move, removing features retroactively and saying either pay or live with a old version. Totally inacceptable. I'd be glad if you were able to show them once again that this is not how open source works.

@Zegorax
Copy link
Owner Author

Zegorax commented Apr 17, 2020

@D3nnis3n Thank you. However it is not working now because they have removed their public key from inside the container. To this day I still don't know how they are doing it, but I will figure it out over time.

Please contact me or make a PR if anyone finds a way.

@D3nnis3n
Copy link

D3nnis3n commented Apr 17, 2020 via email

@Zegorax
Copy link
Owner Author

Zegorax commented Apr 17, 2020

Can you try with the tag "latest" ? Normally it should not work

@D3nnis3n
Copy link

D3nnis3n commented Apr 17, 2020 via email

@VictorJosso
Copy link

Dear @Zegorax I need to talk to you. Could you contact me by email, please?

@Zegorax
Copy link
Owner Author

Zegorax commented Apr 19, 2020

@VictorJosso I've sent you an email.

@Zegorax Zegorax added the help wanted Extra attention is needed label Apr 24, 2020
@kevdogg
Copy link

kevdogg commented Apr 26, 2020

Not meaning to chime in here, but I'm assuming this is in relation to this problem I'm getting now
Screen Shot 2020-04-26 at 9 46 53 AM
I'm using the onlyoffice/documentserver-ie image

@Zegorax
Copy link
Owner Author

Zegorax commented Apr 26, 2020

@kevdogg Yes.

@warnerbryce
Copy link

I have built a docker container of
OnlyOffice DocumentServer with 100 simultaneous connections and the Mobile Edition back again.
Contact me if you want to discuss how the code source was modded.
On Docker hub it’s nemskiller007/officeunleashed

@Zegorax
Copy link
Owner Author

Zegorax commented Apr 27, 2020

@warnerbryce Thanks for your efforts ! However I have no way to contact you

@warnerbryce
Copy link

@Zegorax i am the author of this topic
https://help.nextcloud.com/t/onlyoffice-compiled-with-mobile-edit-back/79282/4
You can PM me on this plateform

@uchagani
Copy link

I'm using onlyoffice/documentserver:5.5.0.165 with the latest iOS app and I'm still seeing the "Mobile editing not allowed message on mobile". I verified that I changed the entrypoint of the docker container to entrypoint: bash -c "wget https://raw.githubusercontent.com/Zegorax/OnlyOffice-Unlimited/master/install.sh && bash install.sh"

@warnerbryce
Copy link

@uchagani the script don’t work for me.
I’ve made a docker container with everything inside. Follow this :
https://help.nextcloud.com/t/onlyoffice-compiled-with-mobile-edit-back/79282

@adam314315
Copy link

Hello,

Could you please advise regarding the license activation issue and the best process to setup Onlyoffice now. Should one start with version 5.5 or can use latest version (6.1.1 for DocumentServer)? Thanks for providing some indication.

@y0grt
Copy link

y0grt commented Dec 28, 2020

https://github.com/aleho/onlyoffice-ce-docker-license

@adam314315
Copy link

Could you please describe a little bit the process to setup? Does this docker needs to be pull out and install after having setup the official enterprise docker?

@D3nnis3n
Copy link

@jmlgo Many thanks, that's absolutely gorgeous.

@y0grt
Copy link

y0grt commented Dec 28, 2020

@adam314315 Simply use this image:

image: alehoho/oo-ce-docker-license:latest

@mhaluska
Copy link

@kikislater @adam314315
You should move this discussion to https://github.com/aleho/onlyoffice-ce-docker-license

@mario-evangelista-silva

@kikislater @adam314315
You should move this discussion to https://github.com/aleho/onlyoffice-ce-docker-license

This @aleho image really works.

@jpVm5jYYRE1VIKL
Copy link

@Zegorax

Okay thanks anyway! So I had a look at the new OO build, and they removed the public key from docservice. If someone is motivated to reverse engineer it with me, just PM me on Twitter @Zegorax and we can look trough it together

So i can say that you not right. After some debug of docserver and converter i found that public key which used to check signature still inside project but it is encrypted and decrypt during runtime from some kind of json struct. I dont have a lot of knowledge about how node.js internals works and basically not exist even internet reversing pratice of nodejs vm but if somebody tell what toolset was used to make binary from js i ll be happy. In current moment i did a patch of license check but i think that my patch is not so nice and will be not usable for average person (pure assembler opcodes in specific places). I also can say that all this docker license projects like https://github.com/aleho/onlyoffice-ce-docker-license is absolutely not same as enterprise edition. They partially have different code base.

@Zegorax
Copy link
Owner Author

Zegorax commented Jun 1, 2021

@jpVm5jYYRE1VIKL Thank you for your findings! Can you tell me which file is doing the decryption process ?

@jpVm5jYYRE1VIKL
Copy link

jpVm5jYYRE1VIKL commented Jun 1, 2021

@Zegorax it is decrypted by converter and docservice binaries. And hardcoded there. I not found yet exact place . But i know that in heap PUBLIC key appear after execution methods :
node::BaseObject::FromJSObject(v8::Localv8::Object)
node::Buffer::Data(v8::Localv8::Value)

in moment of runtime heap segment look like following :

-Rmĕ r..-----BEGIN PUBLIC KEY---
--.MIGfMA0GCSqGSIb3DQEBAQUAA4GNA
DCBiQKBgQDRhGF7X4A0ZVlEg594WmODV
VUI.iiPQs04aLmvfg8SborHss5gQXu0a
IdUT6nb5rTh5hD2yfpF2WIW6M8z0WxRh
wicg.Xwi80H1aLPf6lEPPLvN29EhQNjB
pkFkAJUbS8uuhJEeKw0cE49g80eBBF4B
CqSL6.PFQbP9/rByxdxEoAIQIDAQAB.-
----END PUBLIC KEY-----.{"brandi
ng":false,"connections":9999,"cu
stomization":false,"end_date":"2
099-01-01T23:59:59.000Z","light"
:"False","mode":"","portal_count
":"0","process":2,"ssbranding":f
alse,"test":"False","trial":"Fal
se","user_quota":"0","users_coun
t":9999,"users_expire":99999,"wh
iteLabel":false,"customer_id":"c
ustomerID","start_date":"2020-01
-01T00:00:00.000Z","users":[],"v
ersion":2}N.....H...............

@Zegorax
Copy link
Owner Author

Zegorax commented Jun 1, 2021

@jpVm5jYYRE1VIKL Okay, that means that everything is still executed locally. It confirms my suspicions since I didn't see any network traffic fetching the public key. However, I don't know what encoding they are using between the BEGIN and END.

Edit: Okay I found it. They simply replaced newlines with dots.

Capture d’écran 2021-06-01 à 21 36 42

@jpVm5jYYRE1VIKL
Copy link

jpVm5jYYRE1VIKL commented Jun 1, 2021

@Zegorax
Well in case if they add online licensing i will be much easy to fix because will be possible to find interaction function. With Nodejs it is bit tricky because it usigng "converter:v8::internal::MaybeHandle" which like interpretator ie every new procedure call calculates during execution inside this "MaybeHandle".
So we have hopes to get fixed script ?
PS : nope this dots is not dots . it is non-printable symbol i presume 0x0d

@Zegorax
Copy link
Owner Author

Zegorax commented Jun 1, 2021

@jpVm5jYYRE1VIKL I just took a look at the docservice executable, and I couldn't find the string that you've posted. Could you detail which steps you took to get it ?

@jpVm5jYYRE1VIKL
Copy link

jpVm5jYYRE1VIKL commented Jun 1, 2021

@Zegorax ida pro disassmbler + attached debugger to running process. key was found in process memory in moment of execution.

if you don`t have debugger it is possible also to find if to look in /proc/pid/maps and find Heap addresses
for example :
03110000-037db000 rw-p 00000000 00:00 0 [heap]

after it need to search for "----BEGIN PUBLIC KEY---
--" in heap memory

@Zegorax
Copy link
Owner Author

Zegorax commented Jun 1, 2021

@jpVm5jYYRE1VIKL Interesting! So now the goal would be to find what fills this memory address I guess

@jpVm5jYYRE1VIKL
Copy link

@Zegorax this is not so easy. to make it need to know exactly how js works with memory on low level. I not found even low level node js API description which is much easier question. So for exact information how js work with memory on low level i can only dream. :)

@Zegorax Zegorax mentioned this issue Jun 30, 2021
@Zegorax Zegorax mentioned this issue Apr 2, 2022
@v3ss0n
Copy link

v3ss0n commented Apr 22, 2022

So its no longer work in version 7 ? How can i help.

@tezeb
Copy link

tezeb commented Jun 29, 2022

For what it's worth, OnlyOffice Document Server version 6.4.2.6(digest: 7e4a36f99966) seems to work fine with mobile Nextcloud without license.

@sickfuck666
Copy link

Hello!
Anyone knows workarounds for ver 7? Trial reset maybe?
Last time it was blocked - i tried to upgrade, it shows Workspace Enterprise Edition, "Your subscription to support and updates has expired" but worked.
After 30 days it was blocked again.
I tried to return to community edition - don't know right way, tried
apt remove onlyoffice-documentserver-ee
apt add onlyoffice-documentserver

and now it works again, still shows Workspace Enterprise Edition, "Your subscription to support and updates has expired"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests