Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.electronics.design > #482354 > unrolled thread

Sandsifter software finds hidden instructions inside processors.

Started byskybuck2000@hotmail.com
First post2017-10-21 05:47 -0700
Last post2017-10-29 14:31 -0700
Articles 13 — 8 participants

Back to article view | Back to sci.electronics.design


Contents

  Sandsifter software finds hidden instructions inside processors. skybuck2000@hotmail.com - 2017-10-21 05:47 -0700
    Re: Sandsifter software finds hidden instructions inside processors. skybuck2000@hotmail.com - 2017-10-22 13:26 -0700
    Re: Sandsifter software finds hidden instructions inside processors. Sylvia Else <sylvia@not.at.this.address> - 2017-10-23 11:49 +1100
      Re: Sandsifter software finds hidden instructions inside processors. skybuck2000@hotmail.com - 2017-10-22 19:43 -0700
        Re: Sandsifter software finds hidden instructions inside processors. Agaric <3ember@gmail.com> - 2017-10-23 08:15 -0700
        Re: Sandsifter software finds hidden instructions inside processors. krw@notreal.com - 2017-10-23 20:26 -0400
      Re: Sandsifter software finds hidden instructions inside processors. Rob <nomail@example.com> - 2017-10-23 09:01 +0000
        Re: Sandsifter software finds hidden instructions inside processors. Klaus Kragelund <klauskvik@hotmail.com> - 2017-10-23 02:59 -0700
          Re: Sandsifter software finds hidden instructions inside processors. Rob <nomail@example.com> - 2017-10-23 11:39 +0000
            Re: Sandsifter software finds hidden instructions inside processors. "Tim Williams" <tmoranwms@gmail.com> - 2017-10-23 18:21 -0500
    Re: Sandsifter software finds hidden instructions inside processors. skybuck2000@hotmail.com - 2017-10-23 16:23 -0700
    Re: Sandsifter software finds hidden instructions inside processors. Jasen Betts <jasen@xnet.co.nz> - 2017-10-25 07:48 +0000
    Re: Sandsifter software finds hidden instructions inside processors. skybuck2000@hotmail.com - 2017-10-29 14:31 -0700

#482354 — Sandsifter software finds hidden instructions inside processors.

Fromskybuck2000@hotmail.com
Date2017-10-21 05:47 -0700
SubjectSandsifter software finds hidden instructions inside processors.
Message-ID<2bc2db5d-863c-4925-9f53-79b6f2fd74a7@googlegroups.com>
Hello,

I just watched this video, it's pretty interesting and somewhat amazing, this guy find a way to find hidden instructions inside processors:

https://www.youtube.com/watch?v=KrksBdWcZgQ

The software which finds these hidden instructions is available too:

https://github.com/xoreaxeaxeax/sandsifter

Apperently it's open source python and a little bit of C.

It will probably require some kind of python interpreter/executor and probably admin rights to run.

I am not yet sure how to run this software it will require installing some additional capstone disassembler.

I am curious what would be found on my AMD X2 3800+ from almost 12 years ago... if it will run at all... I think it will run.

I would be curious to also here results of other people ! ;)

So if you curious as to what secret instructions exist inside your computer give this a run.

Later today or in the coming days when I have some time for this I will return to 
this subject.

For now I may have other things to do or maybe not :P :)

Bye,
  Skybuck =D

[toc] | [next] | [standalone]


#482487

Fromskybuck2000@hotmail.com
Date2017-10-22 13:26 -0700
Message-ID<e59e7d5a-1f3b-4afa-ab97-eb931a25c2f9@googlegroups.com>
In reply to#482354
Hi,

I hope you have the following newsgroup in case you are highly interested in knowing every last detail and every thought I have on this subject matter:

https://groups.google.com/forum/#!forum/alt.comp.hardware.pc-homebuilt

There I have written some detailed postings.

In the other newsgroups I will constrain myself to the most important matter/summary of my activities, findings and productions for your usage.

The most important information I want to share with you is the following:

1. I was successfull in running SandSifter software with Linux Mint 18.2 booteable DVD, downloaded ISO from the internet and undocumented instructions have been found for AMD X2 3800+ Dual Core processor.

2. All files are available on my webdrive:

www.skybuck.org/SandSifter/

Explore the "unzipped folder" to see what it's all about.

3. I have written two tutorials how you can also run this software on your computer in case you have a DVD drive and DVD disc to burn this software onto.
One manual tutorial and one automatic tutorial. The automatic tutorial is the easiest one which I will post here, the automatic tutorial includes a run.sh script which I will also post here, this is to help you run this software on your machine, at the end of this posting I will discuss any possible risks to doing so in case you are worried.

Automatic tutorial:

Step 1. Download Linux Mint ISO (Successfully tested on Linux Mint 18.2 Sonya)

https://www.linuxmint.com/

Step 2. Burn Linux Mint ISO to DVD (Windows 7: Right click on file and choose burn to disc).

Step 3. Boot Linux Mint ISO from DVD (Restart computer, if needed go into bios and change boot order, or press F8 to bring up boot menu or something like that)

Step 4. Start FireFox Web Browser

Step 5. Download SandSifter software and extract to a folder.

https://github.com/xoreaxeaxeax/sandsifter

(Click "clone or download", then click "download zip", then click "open with archive manager", then click "extract" (top left icon), click "other locations", choose a harddisk or other storage
medium which is persistent, click on the storage medium, click create new folder (top right icon), name for folder could be "test", click "extract", click "show the files")

Enter the folder "sandsifter-master" by left clicking on it.

Step 6. Download Skybuck's Flying run.sh script file 

Download and save the "run.sh" script file to/inside the "sandsifter-master" folder.

http://www.skybuck.org/SandSifter/unzipped/run.sh

Step 7. Open terminal window and resize it to make it bigger

Right click in the empty space and choose "open in terminal"

A window and a prompt/blinking cursor should now come up looking similar to:

mint@mint /media/mint/Windows 7 System (New)/test/sandsifter-master $ 

Make the window bigger so that the summarize script at the end doesn't crash !

Drag and Drop the window at the bottom right corner to make it bigger (Hold the left mouse button to drag and make it bigger then let mouse button go)

Step 8. Run Skybuck's Flying Bash Script to install software and run SandSifter

type the following command:

bash ./run.sh

Step 9. Guide the software installation and upgrade process

Sometimes it will ask if you want to continue ? Press the Y key.

Once it's done installing SandSifter will automatically run and finally a summary will be created.

Step 10. Wait for the analysis to complete

Once you see instructions scrolling/flying over the screen go take a sleep and wait many hours until it is completely done.

Once it is done it will show something like: "May the Force be with you ! Always !" then you know the script is done !

Step 11. Do not open the log files !

The log files (in data folder) may be to big for the Linux Mint 18.2 text and office editors to handle ! This will probably crash/hang the system !

Step 12. Go into the data folder and send the files to the e-mail address:

xoreaxeaxeax@gmail.com


The run.sh script:

echo "Step 1. Install standard C library software"
sudo apt-get install libc6-dev

echo "Step 2. Install python pip"
sudo apt install python-pip

echo "Step 3. Update python pip"
sudo pip install --upgrade pip

echo "Step 4. Install setuptools"
sudo pip install setuptools

echo "Step 5. Install capstone binaries"
sudo apt-get install libcapstone3

echo "Step 6. Install capstone dev source"
sudo apt-get install libcapstone-dev

echo "Step 7. Install capstone python bindings (this will take a while)"
sudo pip install capstone

echo "Step 8. Make sandsifter"
make

echo "Step 9. Run sandsifter"
sudo ./sifter.py --unk --dis --len --sync --tick -- -P1 -t

echo "Step 10. Summarize"
./summarize.py data/log

echo ""
echo "Bash script"
echo "Version 0.01 created on 22 october 2017 by Skybuck Flying"
echo "To Install, Make, Run, Summarize SandSifter Software and Software Dependencies"
echo "Successfully tested on Linux Mint 18.2 Sonya on AMD Dual Core X2 3800+ processor"
echo "May the Force be with you ! Always ! =D"
echo "Have fun analyzing undocumented instructions !!!!"
echo "E-mail results to or contact: xoreaxeaxeax@gmail.com"
echo "^^^ !!! Author of SandSifter Software and interested in log files !!! ^^^"
echo ""

For now I will not discuss the collected data, this will have to be further analyzed, however I will say that the collected data is in this folder:

http://www.skybuck.org/SandSifter/unzipped/data/

The log file contains discovered undocumented instruction byte code sequences for further investigation. 

(Lastly I will try and collect the messages I write on this subject matter in the messages folder so you don't have to scavenge the usenet/web for all info;) a bit tricky but I will try at least :))

Bye,
  Skybuck.

[toc] | [prev] | [next] | [standalone]


#482506

FromSylvia Else <sylvia@not.at.this.address>
Date2017-10-23 11:49 +1100
Message-ID<f54slgFi2q4U2@mid.individual.net>
In reply to#482354
On 21/10/2017 11:47 PM, skybuck2000@hotmail.com wrote:
> Hello,
> 
> I just watched this video, it's pretty interesting and somewhat amazing, this guy find a way to find hidden instructions inside processors:

With the exception of hidden instructions which bypass security, I can't 
help feeling this is uninteresting. One reason instructions are not 
documented is that they don't work reliably.

Sylvia.

[toc] | [prev] | [next] | [standalone]


#482509

Fromskybuck2000@hotmail.com
Date2017-10-22 19:43 -0700
Message-ID<e7aa3dd1-60a6-4745-aefc-ae52a3e1de6c@googlegroups.com>
In reply to#482506
On Monday, October 23, 2017 at 2:49:58 AM UTC+2, Sylvia Else wrote:
> On 21/10/2017 11:47 PM, skybuck2000@hotmail.com wrote:
> > Hello,
> > 
> > I just watched this video, it's pretty interesting and somewhat amazing, this guy find a way to find hidden instructions inside processors:
> 
> With the exception of hidden instructions which bypass security, I can't 
> help feeling this is uninteresting. One reason instructions are not 
> documented is that they don't work reliably.

I fail to see any logic in that. If an instruction does not work reliably why hide it ? When not simply document it as: "This instruction does not work reliably so don't use it"  

Why all the secrecy ? The logic does not add up.

Furthermore the SandSifter run flawlessly and executed all these hidden instructions without crashing the system, itself or anything else. 

Thus at least on my processor the opposite seems to be the case... at least it's reliably enough that nothing crashes. Perhaps not all variations were tried or perhaps they were... at least not all values/offsets/indexes were tried that's for sure.

However why would some values or indexes fail, again very little logic in that.

Furthermore why would hidden instructions be unreliable ? What is ment with unreliable ? Some times they work and sometimes not ? This would indicate defective transistor gates.

It's not like Intel/AMD/Transmeta can simply sell chips which are defective and then simply hide defective instructions. This is not the way it works... applications would then simply crash or fail to function properly.

One possibility might be "experimental instructions".. the implementation failed/was flawed and thus the instructions were hidden from sight.

Again a bit of strange logic. Why not simply remove them all together ?

Would this indicate "detection of failure" after the chip was produced ? Surely there would be prototypes and failed pieces of design would be removed... possibly to speed up production.

One reason to leave it in might be to not mess with current design to safe development costs and not risky further damaging/upsetting the design.

This would imply that there would have to be some mechanic to hide these instructions from plain sight. Well ofcourse this is the documentation at work... the docs are missing for these.

However if it were known these instructions are flawed/unreliable... wouldn't it be safer to disable them by for example a bios patch ? Or any other patch ?

Surely there would be some way to disable them.

This "disabling" has apperently not be done which could be a very clear indication that these instructions are anything but flawed/unreliable and survive some secret/hidden purpose !

Bye,
  Skybuck.

[toc] | [prev] | [next] | [standalone]


#482542

FromAgaric <3ember@gmail.com>
Date2017-10-23 08:15 -0700
Message-ID<osl12a$6aj$1@gioia.aioe.org>
In reply to#482509
On 10/22/2017 07:43 PM, skybuck2000@hotmail.com wrote:
> Surely there would be some way to disable them.
>
> This "disabling" has apperently not be done which could be a very clear indication that these instructions are anything but flawed/unreliable and survive some secret/hidden purpose !

Then how do you explain ǝ̡̢̛̼̩̦̻̲̦̿͋̄̏͌̋̚ ɔ̶̤͇̦͈͍͈͇̃́̆͒̓́̕͟ ɐ̷̡̫̫̗̥̺̺͆͐͌̋̚̕͜͝͝ ʞ̶̼͖̪̻̥̬̃̄̉̔͒̐͒͋ ɹ̴̡̘͖͉̮̺̥̪̱̊̄̀̐͛͒͂̿͞͡ o̶̲̙̯̞̱̟̅̈́͗͑̍͐̀̅́̚ͅ ʇ̴̧̳̖̳̠͙͓̻̪͔͆̇͛̅͠͝ ư̡̡̮͇̺̝̙͉͔̄̽̑̆̉̂̕̕͢ ǝ̧̧͎̩͕͉̳̥͍̺͗̉̅̋̽̃̿ ɹ̵̯̳̩̪͉͕̽̈̿̆͛̒̽̿͞ͅ 
ɹ̵͙̬̱̖͚̘̬͇̦̀͗̑̀͛̉͑̏͑͘͜ ṉ̢̛͓̣̝̲̪̰̮̒̏̅͢͞ Ɔ͕̪̜͉̬̩̿̏̓̈̂̍͋͝  ?

[toc] | [prev] | [next] | [standalone]


#482605

Fromkrw@notreal.com
Date2017-10-23 20:26 -0400
Message-ID<v02tuc9593ed2gl3odog70r904rgqdtkem@4ax.com>
In reply to#482509
On Sun, 22 Oct 2017 19:43:17 -0700 (PDT), skybuck2000@hotmail.com
wrote:

>On Monday, October 23, 2017 at 2:49:58 AM UTC+2, Sylvia Else wrote:
>> On 21/10/2017 11:47 PM, skybuck2000@hotmail.com wrote:
>> > Hello,
>> > 
>> > I just watched this video, it's pretty interesting and somewhat amazing, this guy find a way to find hidden instructions inside processors:
>> 
>> With the exception of hidden instructions which bypass security, I can't 
>> help feeling this is uninteresting. One reason instructions are not 
>> documented is that they don't work reliably.
>
>I fail to see any logic in that. If an instruction does not work reliably why hide it ? When not simply document it as: "This instruction does not work reliably so don't use it"  

Because it may have unintended consequences, like being a big, fat,
security hole.  No one knows because it's unintended.

>Why all the secrecy ? The logic does not add up.

Secrecy?

>Furthermore the SandSifter run flawlessly and executed all these hidden instructions without crashing the system, itself or anything else. 

But you don't know what else it does.

<yawn>

[toc] | [prev] | [next] | [standalone]


#482516

FromRob <nomail@example.com>
Date2017-10-23 09:01 +0000
Message-ID<slrnourbvk.omv.nomail@xs9.xs4all.nl>
In reply to#482506
Sylvia Else <sylvia@not.at.this.address> wrote:
> On 21/10/2017 11:47 PM, skybuck2000@hotmail.com wrote:
>> Hello,
>> 
>> I just watched this video, it's pretty interesting and somewhat amazing, this guy find a way to find hidden instructions inside processors:
>
> With the exception of hidden instructions which bypass security, I can't 
> help feeling this is uninteresting. One reason instructions are not 
> documented is that they don't work reliably.
>
> Sylvia.

Anything "discovered" or posted by Skybuck is uninteresting.

[toc] | [prev] | [next] | [standalone]


#482522

FromKlaus Kragelund <klauskvik@hotmail.com>
Date2017-10-23 02:59 -0700
Message-ID<8be87dca-9957-4b5a-8864-cf0acdaa126d@googlegroups.com>
In reply to#482516
On Monday, October 23, 2017 at 11:01:48 AM UTC+2, Rob wrote:
> Sylvia Else <sylvia@not.at.this.address> wrote:
> > On 21/10/2017 11:47 PM, skybuck2000@hotmail.com wrote:
> >> Hello,
> >> 
> >> I just watched this video, it's pretty interesting and somewhat amazing, this guy find a way to find hidden instructions inside processors:
> >
> > With the exception of hidden instructions which bypass security, I can't 
> > help feeling this is uninteresting. One reason instructions are not 
> > documented is that they don't work reliably.
> >
> > Sylvia.
> 
> Anything "discovered" or posted by Skybuck is uninteresting.

It was actually an interesting video, a very knowledgeable guy presenting

But claiming that "secret" instructions are in the processor, just because the upcode is unused, and millions of them in one processor is just plain naive (like Skybuck)

Cheers

Klaus

[toc] | [prev] | [next] | [standalone]


#482529

FromRob <nomail@example.com>
Date2017-10-23 11:39 +0000
Message-ID<slrnourl8e.8qe.nomail@xs9.xs4all.nl>
In reply to#482522
Klaus Kragelund <klauskvik@hotmail.com> wrote:
> On Monday, October 23, 2017 at 11:01:48 AM UTC+2, Rob wrote:
>> Sylvia Else <sylvia@not.at.this.address> wrote:
>> > On 21/10/2017 11:47 PM, skybuck2000@hotmail.com wrote:
>> >> Hello,
>> >> 
>> >> I just watched this video, it's pretty interesting and somewhat amazing, this guy find a way to find hidden instructions inside processors:
>> >
>> > With the exception of hidden instructions which bypass security, I can't 
>> > help feeling this is uninteresting. One reason instructions are not 
>> > documented is that they don't work reliably.
>> >
>> > Sylvia.
>> 
>> Anything "discovered" or posted by Skybuck is uninteresting.
>
> It was actually an interesting video, a very knowledgeable guy presenting
>
> But claiming that "secret" instructions are in the processor, just because the upcode is unused, and millions of them in one processor is just plain naive (like Skybuck)
>
> Cheers
>
> Klaus

I have not viewed the video, but "undocumented instructions" due to
incomplete decoding have been there since the early days.  Often it
could be derived what they would do by locating them in a matrix of
instructions (where rows and columns are determined by part of the
opcode bits) and check what is in neighboring columns and rows.
But sometimes they just do weird things.

In a modern processor one would expect that all unimplemented instructions
cause a "illegal instruction" trap.   That also allows software emulation
of instructions added in future versions of the processor.

[toc] | [prev] | [next] | [standalone]


#482595

From"Tim Williams" <tmoranwms@gmail.com>
Date2017-10-23 18:21 -0500
Message-ID<osltgp$fva$1@dont-email.me>
In reply to#482529
"Rob" <nomail@example.com> wrote in message 
news:slrnourl8e.8qe.nomail@xs9.xs4all.nl...
> I have not viewed the video, but "undocumented instructions" due to
> incomplete decoding have been there since the early days.  Often it
> could be derived what they would do by locating them in a matrix of
> instructions (where rows and columns are determined by part of the
> opcode bits) and check what is in neighboring columns and rows.
> But sometimes they just do weird things.

Watch the video, or read the whitepaper -- it's good either way.

Some undocumented instructions are added by the manufacturer.  Think of the 
Intel Optimizing Compiler fiasco -- I mean, obviously, detecting and giving 
negative optimization to AMD is stupid and beside the point, but it's 
entirely possible that, in the course of optimizing for Intel, they used 
some of their undocumented instructions to give just that little edge more. 
Or, say, hidden deep within drivers; who knows (does anyone regularly audit 
and deobfuscate drivers?).


>
> In a modern processor one would expect that all unimplemented instructions
> cause a "illegal instruction" trap.   That also allows software emulation
> of instructions added in future versions of the processor.

It's hard to say if old school instruction-decoder-"do not care" 
instructions are present today.  One would hope they're all trapped (and 
that the trap fires first, before getting deep into the pipeline, and before 
affecting registers or caches), but how would you know until they've been 
tested?

They could easily have missed some, or added some beta version instructions 
(so to speak?) that are undocumented, and probably require further testing, 
that could result in "undefined" behavior with respect to registers, access 
levels, caches, who knows what...

Tim

-- 
Seven Transistor Labs, LLC
Electrical Engineering Consultation and Contract Design
Website: http://seventransistorlabs.com 

[toc] | [prev] | [next] | [standalone]


#482596

Fromskybuck2000@hotmail.com
Date2017-10-23 16:23 -0700
Message-ID<218fcd38-9831-4776-b1dd-3af6bcb18ce1@googlegroups.com>
In reply to#482354
Idea of this software is basically:

Generate random bytes and feed them to processor.

Observe result of processor if good or bad (error codes).

If good check docs.
If bad adjust and retry.

Somebody wrote a nice short explanation of what SandSifter does to give you an idea (it's a new algorithm to find undocumented instructions fast !):

It's guessing possible X86 instructions by exploiting the Instruction Decoder via the (PF) Page Fault result code. Effectively splitting an instruction across two pages and only having one page of it executable. When the decoder fetches the instruction it notices that it's incomplete, attempts to fetch the next part that is on a new non-executable page. The decoder then throws a page fault since it's not executable. So it moves the entire instruction one to the left and tries again with various combinations until it doesn't get a page fault at which point it executes it.

And thus it attempts to 'tunnel' through every possible instruction. That's the general very simplified explanation.

Bye,
  Skybuck.

[toc] | [prev] | [next] | [standalone]


#482843

FromJasen Betts <jasen@xnet.co.nz>
Date2017-10-25 07:48 +0000
Message-ID<ospfla$70g$1@gonzo.alcatraz>
In reply to#482354
On 2017-10-21, skybuck2000@hotmail.com <skybuck2000@hotmail.com> wrote:
> Hello,

> https://github.com/xoreaxeaxeax/sandsifter
>
> Apperently it's open source python and a little bit of C.
>
> It will probably require some kind of python interpreter/executor and probably admin rights to run.

yes and no.

> I am not yet sure how to run this software 

The guy was using debian linux. if that's the same video I saw in july.

-- 
This email has not been checked by half-arsed antivirus software 

[toc] | [prev] | [next] | [standalone]


#483466

Fromskybuck2000@hotmail.com
Date2017-10-29 14:31 -0700
Message-ID<eec6f924-8a1f-419d-9d2e-40068a8436dc@googlegroups.com>
In reply to#482354
I am going to issue a warning about all of this software:

SandSifter, Linux Mint 18.2 and install-apt and for windows: git

For now I suspect running two instances of SandSifter at same time on Linux Mint 18.2 caused file system corruption as can be seen on these three screenshots also checkdisk log file is included in web folder:

http://www.skybuck.org/SandSifter/unzipped/risks/

Possible causes of file system corruptions:

1. Running two instances of SandSifter + Linux Mint 18.2
2. Git on Windows
3. Perhaps a problem was already with file system.
4. BIOS Corruption in recent past.
5. Spark when other person connected laptop to power output... there was a spark.
6. FireFox corruption while browsing or extracting files !
Google detected cooky corruption... so FireFox is also a prime suspect !
7. Capstone disassembler
8. Possibly execution of hidden instructions or corruption because of it ;)

Be carefull !

I still have to investigate checkdisk log further though ! ;)

Bye,
  Skybuck.

[toc] | [prev] | [standalone]


Back to top | Article view | sci.electronics.design


csiph-web