Year: 2016

I’ve been insanely busy at work, and the few hours I do get home I end up spending sleeping

vivo Christmas

Of all things it was some ‘critical update’ nonsense on my phone that suddenly set the mood. As a personal rant I think it is kind of funny that in China we can say “Merry Christmas” without any impunity, nobody threatens my livelyhood just because of uttering two words. Over in the middle kingdom I don’t have to hide behind “seasons greetings” or any of that other PC tripe. Who would have thought 30 years ago that living in some Communist dictatorship would actually be more free. Oh well, it’s more bizarre as I had that blitz trip to the United States where Christmas is all but outlawed by the PC police, and so many Chinese were hoping to see big public displays that just simply don’t exist, just as where I contract for reminded everyone that Christmas is banned in name.

If this were twitter I would no doubt face harsh criticism for writing such a thing, with actual consequences. The ‘tolerant’ left is anything but.

I can only imagine the manufactured outrage over something like the Commodore Christmas demo for the Commodore 64 in these modern ages.

But here, I rent my own server so I can write whatever I please. Lest we remember in the dawn of “fake news” it really is more so a war on unacceptable news, as we further burrow into our “truth silos” where any option that challenges our world view must be removed. Naturally people find government censorship of this level intolerable, but oddly enough find no qualms about having corporations do this for them. And corporations will gladly defend themselves from the ‘fake news’ while serving endless and misleading native ads, as long as consumers keep buying. It is an interesting shift driven in the media space, as companies struggle to stay relevant in the crybully and offended Olympic age.

I guess if anything I’m still just amazed how big Christmas is in places where I’d never traditionally find it, as the commercial aspects of it are being absorbed in a cargo cult like fashion, but in retrospect in the west 30 years ago Christmas was pretty much a cargo cult holiday, saying and doing the motions for that precious cargo, aka going through the massive catalogs of the time, and hoping Santa would buy the right thing, which of course for the most part they did not…

I cannot understand why you want this, or why I’m even going to do it. At this point in GCC history the winnt-3.5 target had been dumped in favour of going all in with Cygwin. So yeah, this does not either clearly configure, or compile. But a little bit of mashing files, and I have it at least compiling some assembly that can be translated into an object file that a later version of MinGW can actually compile.

All I’ve built is the gcc driver, the cpp pre-processor, and the cc1 aka C backend.

I know this is what 99.99% of people hope I never do, but let’s make an incredibly insecure VPN! yay!

Motivation

So the thing is that I have a cisco router and I’d love for it to connect to some Windows machine over an existing OpenVPN, and NAT out the Windows side. Except for getting the VPN installed, they won’t give me anything else. And they SURE as heck won’t let me connect a cisco router up…..

So first things first, I need to configure my cisco router for an IPIP tunnel, to my test Windows machine, and use the SLiRP default addresses:

Now to start programming.

Well then I went looking and found this fun filled page, about calling winioctl’s myself, and getting winsock to do all kinds of fun things. Namely how IPIP actually works, as it’s is it’s own protocol (none of that pesky TCP/UDP it’s IPIP!) and more importantly I can receive the traffic.

So looking at a quick UDP client/server I figured out that I can modify that so instead of listening with UDP like this:

if((s = socket(AF_INET , SOCK_DGRAM , 0 )) == INVALID_SOCKET)

I can instead call for a RAW socket, and listen on protocol #4 aka IPIP.

if((s = socket(AF_INET , SOCK_RAW , 4 )) == INVALID_SOCKET)

One caveat I had on this, is that you need to run as Administrator on the Windows machine to create raw sockets. If you don’t have administrator privleges you’ll get this error:

Now add in some nonblocking, and feed the data into SLiRP, and I got invalid data! Using wireshark I can see that I only receive the IP portion of the data, so no hardware frame, but what is more interesting is that I receive ALL of the IP information so I get the IP+IP+DATA. So I have to forge a L2 header, and cut out the first IP header. I did this by cheating, using the following for a L2 header:

0x44,0x8a,0x5b,0x62,0xcb,0xaf,0x00,0x1b,0x90,0x21,0x58,0x1b,0x08,0x00

I then just memcpy that to the start of my buffer, then copy in the rest of the received data like this:

memcpy(buf2+14,buf+20,recv_len-20);

And now I can forge data going to SLiRP to make it happy!

And sending replies didn’t make wireshark happy at all, as there is an L2 header in there, that just doesn’t make sense in L3 space, so I trimmed that with the following:

memcpy(buf,qp->data+14,qp->len-14);

Putting it all together

And now much to my amazement I can ping SLiRP from my 7206!

IPIP Ping!

Ok, I know what you are thinking. ICMP is great, but how about TCP? Can I actually use this thing?

I add a route to my BBS over the SLiRP tunnel, with a simple route statement:

ip route 172.86.181.35 255.255.255.255 10.0.2.2

and then telnet…

Telnet to my BBS over IPIP to SLiRP

So yes, it does actually work!\

I don’t think anyone will ever want to use this, but for me it’s 100% novelty in that I could.

I haven’t tried to build any of it, but I figured for the time being, it may be easier to make some tap files for SIMH, and maybe someone else will do the hard work for me. Or it’ll be a lazy day type thing.

Sit down kids, it’s time for an old man rant.

So yeah, I have one of those clients who wants to use ‘one of those’ file sharing sites. UGH. I swear I’m to the point of just paying for an Office 365 subscription for them so I don’t have to deal with this kind of shit. So I hit the site on my phone, then it jumps to this genchatu.top site. Fantastic.

Then I’m alerted that my phone is 28.1% DAMAGED, and somehow my phone’s SIM card will be damaged! Yes, it’s one of these scam sites!

Wow

Oh no, my phone apparently may be already physically damaged? I guess this is once someone is tricked by this official Google looking image you’ll want to throw your phone against the wall. As any user of Android will tell you updates from Google are non existent, and anything that could infect your phone, well is pretty much your problem. You can beg the vendor, but lol, good luck.

I like to live dangerously, so yeah let’s look at the app.

Ace, alright, more like acehole!

So with this scary and official looking thing it’s trying to railroad you into “Ace Cleaner” I don’t know how on earth they haven’t either been reported, or knocked out of the app store. I guess Google is busy teaming up with Facebook trying to figure out how to censor the new appropriately instead of trying to squash actual scam artists.

I honestly haven’t tracked any of these ‘reviews’ to see how many are just idiots, or how many are just ballot stuffers.

Yeah, it’s a scam.

No backing away!

And of course you can’t just back away from the page, you get this nice thing along with something in java script that gets your phone to buzz and light up. Thanks Google! That’ll never get abused like the blink tag!

You have to be kidding me

Oh no, I’ve been threatened to be blocked.

How bad can this crapware be?

Oh dear. From the application page, let’s take a look:

Version 1.1.9 can access:

Device & app history

retrieve running apps

read your Web bookmarks and history

So they know what you are running, and what bookmark’d sites you like.

Identity

find accounts on the device

They know WHO you are.

Contacts

find accounts on the device

They know WHO you KNOW.

Phone

read phone status and identity

Photos/Media/Files

access USB storage filesystem

read the contents of your USB storage

modify or delete the contents of your USB storage

Storage

read the contents of your USB storage

modify or delete the contents of your USB storage

If you have any USB attached device, (flash drive, hard disk…) they can not only READ, but can MODIFY and DELETE the contents. NICE!

Camera

take pictures and videos

I suppose an album of bewildered users would be amusing from time to time. Also having the phone send videos of them doing various things.

Wi-Fi connection information

view Wi-Fi connections

Naturally they want to know about the Wi-Fi AP’s you use.

Device ID & call information

read phone status and identity

I guess knowing your phone charge status, and IEME #’s are good to know too. But wow check out the next laundry list!

Other

bind to an accessibility service

update component usage statistics

read Home settings and shortcuts

write Home settings and shortcuts

read Home settings and shortcuts

write Home settings and shortcuts

view network connections

read battery statistics

send sticky broadcast

change network connectivity

connect and disconnect from Wi-Fi

delete all app cache data

expand/collapse status bar

control flashlight

measure app storage space

full network access

close other apps

run at startup

draw over other apps

control vibration

prevent device from sleeping

modify system settings

write web bookmarks and history

install shortcuts

uninstall shortcuts

Read / Write the home page, guess who you’ll be visiting quite often? Checking out your network, and say if you are somewhere where they want to upload a video, if they KNOW a WiFi network in the area they can have your phone join it, record you, upload it, and drop. Yeah great! I also like the drawing over other apps, that way you may THINK you are running another app, but they are just watching what you are doing. And maybe they’ll pass control down, maybe not.

I suppose it may be fun too if they have a subscription service, to buzz and turn on the camera flash to warn you that you got infected once your subscription lapsed, so you better pay up!

Absolutely deplorable!

Where to go from here?

Seriously how do companies like this survive? I guess quite well. I guess I’m just more amazed by Google’s complacency in all of this. But at the same time they are an ADVERTISING COMPANY, and I’m the product, Android is just the TV programme to get me to watch their annoying ads. And considering their track record with illegal pharmacies, I guess it really is no surprise.

The truth is that no doubt that this kind of thing is just too profitable. And people will just fall time and time again for this trap.

The GNU C compiler is now available for ftp from the file
/u2/emacs/gcc.tar on prep.ai.mit.edu. This includes machine
descriptions for vax and sun, 60 pages of documentation on writing
machine descriptions (internals.texinfo, internals.dvi and Info
file internals).

This also contains the ANSI standard (Nov 86) C preprocessor and 30
pages of reference manual for it.

This compiler compiles itself correctly on the 68020 and did so
recently on the vax. It recently compiled Emacs correctly on the
68020, and has also compiled tex-in-C and Kyoto Common Lisp.
However, it probably still has numerous bugs that I hope you will
find for me.

I will be away for a month, so bugs reported now will not be
handled until then.

If you can’t ftp, you can order a compiler beta-test tape from the
Free Software Foundation for $150 (plus 5% sales tax in
Massachusetts, or plus $15 overseas if you want air mail).

Free Software Foundation
1000 Mass Ave
Cambridge, MA 02138

[tapes are generally in Unix tar format. If you have other needs,
write to the above address, and ask if they can be met. -len]

And indeed, the files are dated 22/03/1987 making this the first public release of GCC.

GNU CC is a fairly portable optimizing C compiler intended for
machines with 32-bit words that have several registers and address
memory in terms of 8-bit bytes. It supports full ANSI standard C, not
including libraries (which we do not consider to be part of a
compiler).
Currently we have working machine descriptions for the Vax and for
the 68000/68020 (including 68881 support).
Optimizations performed by GNU CC include:

GNU CC runs about as fast as PCC.
Most of the optimizations are machine-independent or controlled by a
machine description. GNU CC takes advantage of all the 68020
addressing modes that we can see how to make the Sun assembler
assemble. Debugging output for DBX is available whether you request
optimization or not.

Seeing as 4.3BSD didn’t ship until 1988, I went ahead and set out to build this on 4.2BSD. The first stumbling block I hit is that GCC needs bison. The oldest version of bison I have is 1.25 which honestly is just too new! However in the same location as GCC is this file gnu1988.tar.bz2 which contains all of the current GNU software of 1988! And what is on that tape?

bison-1.00

gcc-1.21

gdb-2.5.1

gplusplus-1.21

libgplusplus

So this is probably as old as it is going to get, so I downloaded and went to compile bison, however getopt is a missing call! A creative search found getopt.c and even better PCC liked it enough to get a running bison so I could then configure GCC.

Configuring GCC is a manual process, but not too involved:

Make a symbolic link from file `config.h’ to the top-level
config file for the machine you are using. Its name should be
`config-MACHINE.h’. This file is responsible for
defining information about the host machine. It includes
`tm.h’.

Make a symbolic link from `tm.h’ to the machine-description
macro file for your machine (its name should be
`tm-MACHINE.h’).

Make a symbolic link from `md’ to the
machine description pattern file (its name should be
`MACHINE.md’)

Make a symbolic link from
`aux-output.c’ to the output-subroutine file for your machine
(its name should be `MACHINE-output.c’).Make sure the Bison parser generator is installed.Build the compiler. Just type `make’ in the compiler directory.

And in a minute I had GCC compiled. I ran it with -v and got this output:

# gcc -v
ld /lib/crt0.o -lc
Undefined:
_main

It really is nowhere near as featured as 1.21 that is for sure! So time to do a simple hello world program: