Having seen references to the mbxver utility, and seeing that it is
able to identify the specific version of MI required to run an MBX. It
seems that it is possible to read and potentially reverse-engineer an
MBX file.
What I would like to know is how secure from plagiarism is anything
written as an MBX?
Is it possible that an application representing 100's of hours of work
could be plagiarised copied or sabotaged by anyone with a hex editor?
Is it necessary to write in another language and call the MI API to
maintain control over any potential intellectual property?
Any thoughts or comments welcome.
Thanks
Gentreau.
Print "Hello World!"
or does it come back looking something like this?
mov ax,@data
mov ds,ax
mov ah,9
mov dx,offset hello_message
int 21h
mov ax,4C00h
int 21h
The first is a lot easier to understand than the second, even though
they mean the same thing to the computer. The first is a lot bigger
threat to your intellectual property than the second, but if the price
is right, your code is not secure even in the second case.
Unfortunately, the MBX file can be decompiled nearly to the first level.
There are some things you can do to make it harder for a software
cracker to understand, and thus "raise the price". First, you could move
critical sections of code to a DLL. Not only would this run faster than
MapBasic, but it can only be decompiled to assembler code. Second, you
could write an "obfuscator" that would pass through your original source
code, renaming variables and procedure names to things like proc001,
proc002, var001, etc. I'm slowly working on such a solution that does
this directly in the MBX file, and renames procedures and variables that
are referenced by memory address to blanks, so that even if the code is
decompiled, it won't recompile (MapBasic can't parse blank symbols). If
I ever get it done, I'll Open Source this code, but in the meantime you
could do a similar thing reprocessing MapBasic source code instead of an
MBX.
In reality, though it is possible to reconstruct high-level source code
from an MBX (minus any comments), it's still hard to do. Only people
with some skill (and presumably with some responsibility) know how to do
this currently, so I don't think there's a monkey out there with the
keys to the banana plantation... yet. But it's only a matter of time now.
- Bill Thoen
Fortunately, I don't think the code I'm writing is valuable enough to
anybody in the industry at which it is aimed to bother cracking it,
but it is definitely worth knowing what is and isn't possible.
Do you know where one could obtain a copy of that document which
describes the MBX extant?
That may help me to see what is possible to hide.
Thanks
Gentreau.
> > Any thoughts or comments welcome.- Hide quoted text -
>
> - Show quoted text -
The author has so far decided not to make it public to prevent any misuse.
Of course this may change in the future.
And I'm not the author :-)
Regards
Uffe Kousgaard
Gentreau
> Having seen references to the mbxver utility, and seeing that it is
> able to identify the specific version of MI required to run an MBX. It
> seems that it is possible to read and potentially reverse-engineer an
> MBX file.
Actually, it is possible to read and potentially reverse-engineer
practically any compiled software, mbx or otherwise.
> What I would like to know is how secure from plagiarism is anything
> written as an MBX?
> Is it possible that an application representing 100's of hours of work
> could be plagiarised copied or sabotaged by anyone with a hex editor?
Yes. But this is not unique to MBX. All software authors have this
issue to face.
> Is it necessary to write in another language and call the MI API to
> maintain control over any potential intellectual property?
Switching to another language does not guarantee control.
> Any thoughts or comments welcome.
> Thanks
> Gentreau.
nick
************************************************************
Opinions contained in this e-mail do not necessarily reflect
the opinions of the Queensland Department of Main Roads,
Queensland Transport or Maritime Safety Queensland, or
endorsed organisations utilising the same infrastructure.
If you have received this electronic mail message in error,
please immediately notify the sender and delete the message
from your computer.
************************************************************
That's a scary claim and certainly needs some qualification. It is of course
possible to read any native machine code, in the more human-readable form of
mnemonic code, and figure out what's happening. The goal in these cases is
usually to reverse engineer an algorithm or figure out how performance is
achieved. Fortunately this is quite difficult and only hardcore hackers will
attempt it, if the reward is big enough (or they are sad enough). With fully
compiled languages like C you cannot see variable names, etc.
Moving to "semi-compiled" languages, like Java and MapBasic, these are
compiled to an intermediate code and executed on a runtime environment.
These are much easier to decompile and its even possible to get variable
names out, which are often helpful for the reverse engineer. Java has tools
like "obfuscators" to scramble variable names, but as far as I know, nothing
exists like this for MapBasic - nor is it likely since many argue that MB
is, although still very useful, somewhat beyond it's shelf life when
compared to modern development languages and environments.
Personally, when I heard about the StopWatch maps decompiler, it was obvious
that either someone had very cleverly reversed engineered the MBX binary or
some inside knowledge had leaked from MapInfo - perhaps smuggled out in the
mind of a departing employee. Either way, we don't do anything IPR-sensitive
in MapBasic any more. Certainly MB is fine for extending Pro with a basic UI
backing on to DLLs for functionality. Indeed, many applications need the
performance from a DLL written in a stronger language anyway.
Regards,
Warren Vick
Europa Technologies Ltd.
http://www.europa-tech.com
I have experience writing in C but little in C++ or C#.
So firstly; should I be able to write some parts of my code in C and
compile it into a DLL?
If so, do I just call the function name within the DLL from my MB code
in the same way that I call a Windows API ?
Regards
Gentreau.
On Apr 11, 1:07 am, "Warren Vick, Europa Technologies Ltd."
Run Make.bat to build the DLL using Microsoft's C compiler. If you're
using a different compiler change the switches to appropriate values.
The critical one is /Gz of course, which means, "Compile using stdcall
convention." If you're compiling form a DOS window, you might need to
run vcvars32.bat first to set cl's environment variables. If you know
how, you could also build this from the VC IDE as well.
The DLL (in MBDLL_Test.c) contains one function, AvgPoint() that
calculates the average point from a collection of points. The MapBasic
code converts a table of points to an array of floats with the x-value
preceding the y-value and passes these to AvgPoint(), which calculates
the mean of the x and y values and returns that result. The returned
point appears in the map window as a blue point in the cosmetic layer.
The file MBDLL_Test.def sets the names of the exported DLL functions.
It's optional, but without it, you get "decorated" functions, i.e.
AvgPoint() would have to be called as _AvgPoint@12() or something like that.
This is a simple example and doesn't contain a lot of error checking or
portable code conventions, but the point was to keep it simple. I'm not
really expert at this yet, and though I may know enough to make it work,
I'm sure there's better ways to code this. Also, in a real application,
you might do better to pass points via a file rather than an array,
because MapBasic is so limited in array memory capacity.
Have fun!
- Bill Thoen
Sorry Sancarn, but I think this makes as much sense as building a MapBasic IDE out of Lego.
For those who don’t like the native MapBasic IDE, there have been attempts to graft MapBasic to other editors. Some are better than others. I think trying to build your own compiler into that IDE is a bit pointless. It’s not easy (I wrote as part of a CS degree a long time ago), is unlikely to reliably keep up with the latest Pro features and involves a massive leap of faith for users to trust your compiler (and that it will not harm them by inserting malicious code) over the definitive one… which is free. I can’t see the upside.
Just because you can do something, doesn’t always make it a good idea!
P.S. Does the MapBasic editor still not have a line delete?
Regards,
Warren Vick
--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
mapinfo-l+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
- a MapBasic IDE written in JavaScript
Sorry Sancarn, but I think this makes as much sense as building a MapBasic IDE out of Lego.
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+unsubscribe@googlegroups.com.
Some JavaScript, utilising jQuery and the Bootstrap framework, but pgAdmin is mostly Python, I believe.
Agreed, but perhaps moot since how many platforms does Pro run on?
Regards,
Warren Vick
From: mapi...@googlegroups.com [mailto:mapi...@googlegroups.com]
On Behalf Of Richard Greenwood
Sent: 16 January 2018 19:50
To: mapinfo-l <mapi...@googlegroups.com>
Subject: Re: [MI-L] Decoding MBX files
On Tue, Jan 16, 2018 at 8:36 AM, Warren Vick <wv...@europa.uk.com> wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+...@googlegroups.com.
An IDE is one thing, but an IDE with integrated compiler which you outlined, all built in JavaScript is another. AWS Cloud 9 is designed to be a web-based browser so you can work on cloud-based projects from anywhere. So, of course it’s got some JavaScript in it. Again, just because it’s possible, it doesn’t make JavaScript the best choice for an IDE with an integrated compiler. Does Cloud 9 have, say, a C or C++ integrated compiler developed in JavaScript and that will build an EXE on the local system? I don’t know the answer, but I would guess no. If you really like Cloud 9, would it not make sense to make MapBasic the 141st language supported rather than inventing yet-another-IDE?
Transpilers are a lot easier to develop than compilers. My first job after graduating was extending AT&T’s cfront, Bjarne Stroustrup’s C++ to C transpiler, with some novelty vector processing extensions. The MBX reverse engineering effort alone would be huge… and not to mention probably breaching licence terms. In fact, why not challenge yourself? As Bill suggested, just try to reverse engineer something really simple like printing “hello world” and then a basic expression. I think this will give you some insight into the effort required.
I’d love to see what you come up with. Best of luck with your project.
Regards,
Warren Vick
From: mapi...@googlegroups.com [mailto:mapi...@googlegroups.com]
On Behalf Of Sancarn
Sent: 16 January 2018 21:38
To: MapInfo-L <mapi...@googlegroups.com>
Subject: Re: [MI-L] Decoding MBX files
So let's start at the top and work our way down!
--
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+unsubscribe@googlegroups.com.
Sorry Sancarn, but I think this makes as much sense as building a MapBasic IDE out of Lego.
For those who don’t like the native MapBasic IDE, there have been attempts to graft MapBasic to other editors. Some are better than others. I think trying to build your own compiler into that IDE is a bit pointless. It’s not easy (I wrote as part of a CS degree a long time ago), is unlikely to reliably keep up with the latest Pro features and involves a massive leap of faith for users to trust your compiler (and that it will not harm them by inserting malicious code) over the definitive one… which is free. I can’t see the upside.
Just because you can do something, doesn’t always make it a good idea!
P.S. Does the MapBasic editor still not have a line delete?
Regards,
Warren Vick
From:
mapi...@googlegroups.com [mailto:mapi...@googlegroups.com]
On Behalf Of Sancarn
Sent: 16 January 2018 15:25
To: MapInfo-L <mapi...@googlegroups.com>
Subject: Re: [MI-L] Decoding MBX files
@Bill, I know this is rather a long time (10 years later!). Do you by any chance have a link/copy of the "one rather complete document describing the structure of the MBX file extant". Recently I started a MapBasic IDE written in JavaScript and it'd be super awesome if I could also make a MapBasic compiler for it! So if you had a copy of the document that'd be really helpful!
--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.