Guide for Siri Authentication keys on Windows

By following this guide you will learn how to extract Siri Authentication keys from a function iPhone 4S, once these keys are extracted they can be used with any Siri GUI Ports and SiriProxy to create a functioning version of Siri on non-supported devices.
Please not that you should never distribute your own keys, as they will be blacklisted by Apple if they are seen connected to too many requests.








Install Ruby and DevKit:

Download necessary files here and here
  • Run Ruby '1.9.3.exe'
  • Install to desired path (I used default C:\Ruby193)
  • Select all optional installation extras
You will now have 'Start Command Prompt with Ruby' in your menu, This is what we will be using.
(I will refer to this in guides as RubyCMD)
  • Open 'Ruby DevKit 4.5.2' (Please Run After fresh ruby install [No extra gems installed])
  • Extract to chosen destination (I chose C:\DevKit and recommend this)
  • Open RubyCMD
Run:
 cd C:\Devkit
 //*[or your chosen install directory]
 ruby dk.rb init
 ruby dk.rb install

Testing the install:
 gem install rdiscount --platform=ruby

You should see: Temporarily enhancing PATH to include DevKit...

Confirm gem is working:
ruby -rubygems -e "require 'rdiscount'; puts RDiscount.new ('**Hello Ruby Installer**').to_html'"

Congratulations you now have Ruby with DevKit installed on Windows.
*Credit for installed to 'RubyInstaller for Windows'*

For OpenSSL download the following files:
  • 32-bit or 64-bit
  • Install to C:\OpenSSL
  • Note: You may need to install Microsoft C++ 2008 Redistributables. Get them here:
  • Microsoft C++ 2008 Redistributables: 32-bit or 64-bit
  • Choose to Copy OpenSSL DLLs to \bin directory.
  • Now we need to add this to the system path.
  • Open: Control Panel, System, Advanced, Environment Variables,System Variable.
  • Edit the variable named 'path' and add:
  • ;C:\OpenSSL\bin
  • At the end of the current value.
  • Apply and close
Open RubyCMD and type:
 openssl

You should now start OpenSSL in RubyCMD with no errors congratulations!


Download Python:
  • 32-bit or 64-bit
  • Install to C:\Python
  • Choose to Copy OpenSSL DLLs to \bin directory.
  • Now we need to add this to system path.
  • Open: Control Panel, System, Advanced, Environment Variables,System Variable)
  • Edit the variable named 'path' and add:
  • ;C:\Python
  • At the end of the current value.
  • Apply and close
Open RubyCMD and type:
 python

Python should now start in RubyCMD.

We now need to install necessary gems


Open RubyCMD and run:
 gem install CFPropertyList 
 gem install eventmachine --pre


Install libxml2:
  • Download necessary files Here
  • Move both iconv.dll and libxml2-2.dll to C:\Ruby193\bin
Generating the certificates

Create a working Directory (Such as C:\SiriServer\Certs)


Open RubyCMD as Admin and run:

(When prompted for password enter whatever you wish. I recommend you choose the same password whenever requested to avoid confusion.
When requested you can enter whatever company information you wish, except at all times enter guzzoni.apple.com as common name, and put in no challenge password.)

 cd C:\SiriServer\Certs
 openssl 
 genrsa -des3 -out ca.key 4096
 req –new –x509 –days 365 –key ca.key –out ca.crt
 genrsa –des3 –out server.key 4096
 req –new –key server.key –out  server.csr

 x509 –req –days 365 –in server.csr –CA ca.crt –CAkey ca.key –set_serial 01 –out server.passless.crt

 rsa –in server.key –out server.key.insecure

 Exit


 move server.key server.key.secure
 move server.key.insecure server.passless.key


 In your C:\SiriServer\Certs folder you should now have the file ca.crt:
  • Email to your 4S and install by opening the file on the iPhone
Move server.passless.key and server.passless.crt to C:\SiriServer
Running the DNS and server:

Download SiriServer.rb Here and extract to C:\SiriServer

Running the DNS:
  • Download the DNS script here
  • Make folder C:\SiriServer\DNS and extract dns.py to it.
  • On line 29 edit 'YourIPGoesHere' with the ip address of your PC
  • On Your phones Wi-Fi, click the blue icon to the side of connected network and set the DNS to the IP address of your PC.
Run:
 cd C:\SiriServer\DNS  
 python dns.py


Now keep this open and open a new RubyCMD Window.

Run:
 cd C:\SiriServer
 ruby siriServer.rb

Now run Siri on your iPhone 4S

Collect your codes  :)
Codes will be dumped in the RubyCMD Windows

Written by @BraddStevo please follow for help and updates.
Application and port By @iP1neapple please follow


44 comments:

  1. For some reason when I get to the OpenSSL step and need to open it in RubyCMD it keeps failing, but the Python step worked perfect. I follow all the steps correctly and add the shortcut to the Variables and when I try and run it I get:

    'openssl' is not recognized as an internal or external command, operable program or batch file.

    ReplyDelete
  2. Have you added 'C:/OpenSSL/bin' on to the end of the existing path system variable, then applied etc. now Restart CMD and try again?

    Let me know

    ReplyDelete
  3. Yes, my path line looks like this:

    C:\Ruby193\bin ;C:\OpenSSL\bin ;C:\Python32

    ReplyDelete
  4. Please get in contact with me via twitter or such and i can teamview guide you
    @BraddStevo

    ReplyDelete
  5. Ok I am following you now on there, mine is
    @StevenCook17

    ReplyDelete
  6. Oh I forgot to ask you during the session, but what do I do with the Tokens once I have them? Like how do I get them onto my iPhone 4? Do i need to use the proxy for that?

    ReplyDelete
  7. Hi Brad, great guide. I've done all the steps, but the last keeps failing (I can't extract the certs when I run Siri). Please help! Contact me on iFans; my username is iHunt.

    ReplyDelete
  8. I dont understand what to do after I open ruby cmd.. I see what I am supposed to do but am not getting anywhere. Please help me understand this step.

    ReplyDelete
  9. im stuck at the dns. the file is missing

    ReplyDelete
  10. "
    Steven J Cook said...
    Oh I forgot to ask you during the session, but what do I do with the Tokens once I have them? Like how do I get them onto my iPhone 4? Do i need to use the proxy for that?
    "

    Thats exactly my question. What I have to do with the Token?

    ReplyDelete
  11. Do i need to get the keys every 24h?

    ReplyDelete
  12. All the downloads should be working fine, in about 30 mins a walk-through video will be uploaded.
    Yes these keys need to be refreshed every 24 hours, but all this should take is for you to do the very last steps. (Running dns.py and siriServer.rb)
    This guide is just for getting your keys, for guide on how to use them view the SiriProxy guide.
    Although I recommend you wait until I update it as it is not as easy as this one is to follow at the moment.
    People who were having issues with running the DNS python script please uninstall python re-download and install again.

    Everyone have a great New Year!

    ReplyDelete
  13. when im trying to generate the certificates and it asks for a pass phrase, i try to type something but for some reason it doesnt show up

    ReplyDelete
  14. is an error in when running this command

    x509 –req –days 365 –in server.csr –CA ca.crt –CAkey ca.key –set_serial 01 –out server.passless.crt

    says unable to load certificate...
    help!!!!

    ReplyDelete
  15. pass phrase is not supposed to show up just type what you want it to be and press enter,

    ensure you are cd into the correct directory where the files, ca.crt server.csr and ca.key are located, if they are not there re run the commands to generate the certs again

    ReplyDelete
  16. i did the entire thing but unlike urs mine gets stuck at that part when Dns.python is to be executed

    ReplyDelete
  17. i get error when i run siri server.rb??????????????? wat to do

    ReplyDelete
  18. its a huge error

    ReplyDelete
  19. thanks for the info,, i've already dumped the code,, but im not sure if its the right one
    when i run siri on the 4s, i got:
    {"class"=>"CreateSessionInfoRequest",
    "aceId"=>"",
    "group"=>"com.apple.ace.system",
    "properties"=>
    {"sessionInfoRequest"=>""bunch of data"}}

    but in other video i saw speech ID, validation data etc,,,
    how do i use this in my iphone 4

    ReplyDelete
  20. i get this error wat do i do ruby 1.9.3p0 (2011-10-30) [i386-mingw32]

    C:\Users\Cash America>cd C:\SiriServer

    C:\SiriServer>ruby siriServer.rb
    siriServer.rb:40:in `unbind': undefined method `close' for nil:NilClass (NoMetho
    dError)
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0.beta.4.1-x86
    -mingw32/lib/eventmachine.rb:1397:in `event_callback'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0.beta.4.1-x86
    -mingw32/lib/eventmachine.rb:179:in `run_machine'
    from C:/Ruby193/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0.beta.4.1-x86
    -mingw32/lib/eventmachine.rb:179:in `run'
    from siriServer.rb:73:in `'

    C:\SiriServer>

    ReplyDelete
  21. i don't get any keys?

    ReplyDelete
  22. Did everything, but when i open siri and talk, she keeps saying "There's something wrong, and i can't answer your questions......."

    what's wrong?

    ReplyDelete
  23. Wont let me email the ca.crt file. Every time I click send it says there was a problem with the attachments along with my message

    ReplyDelete
  24. ip='ipadress'
    print 'Fake DNS Server:: dom.query. 60 IN A %s' % ip

    is this line have probllem? i got syntax error when i type python dns.py

    ReplyDelete
  25. bradstevo must need a iphone 4s?

    ReplyDelete
  26. you need a iphone 4S to get the keys ;-)

    ReplyDelete
  27. Hi, when i set up the DNS server is the iPhone supposed to connect to the internet? because it shows the addresses i am trying to connect on the CMD, but it does not connect on the iPhone, it just keeps loading forever..

    ReplyDelete
  28. Couple Questions: I setup the Siri Proxy Server with Ubuntu via Virtual Box on Windows 7. Is the information on this page additional steps required after the Siri Proxy is up and running in order to move the tokens to my iPhone? If so, can I do this within the same Ubuntu virtual machine or do I need to create another virtual machine to run these steps? Or do I run these steps on the host machine within Windows 7? If setup another VM, I assume I would do so with Windows and not Ubuntu. Thanks for the help...I'm sooo close.

    ReplyDelete
  29. when running ruby siriServer.rb, i get an error that says "Unable to load the EventMachine C extension; to use the pure-ruby reactor, require 'em/pure_ruby" and then a bunch of other stuff. what am i doing wrong?

    ReplyDelete
  30. Problem with your eventmachine install, run 'gem uninstall eventamachine' then 'gem install eventmachine --pre' then try again

    ReplyDelete
  31. ive done everything to the last step.. testing siri.. but nothing is being dumped on the screen ! what to do ? :O

    ReplyDelete
  32. Having the same problem as Jens Markus. I made it through the whole tutorial but when I do Siri on my phone... She tries to communicate with the server (I can see that on the 'python dns.py' screen), but no codes/keys are dumped to either window.

    What is this last piece supposed to look like? Can you include it in the video but just black out the keys?

    ReplyDelete
  33. bradstevo, can u hel me please. i did everything right, but when i run siri on 4s says "There's something wrong, and i can't answer your questions......."

    what to do????

    ReplyDelete
    Replies
    1. i have de code now. wich one i have to fill in spire?

      Delete
  34. @bradstevo can you please tell me what what the //*[or your chosen install directory] means? i did all the previous steps as advised and to an identical directory for both devkit and ruby193.but neither of them seem to work in the command prompt....plz help

    ReplyDelete
  35. he BradStevo I am stuck at the very end of your tutorial and I need help. I just put in my ip address from my phone onto the dns.py script and hit save and after i put in the 2 commands :
    cd C:\SiriServer\DNS
    python dns.py

    I get the little message saying its a fake DNS address, but i get no more activity from that command box unlike in your video. and when I opened the second command box and entered the last 2 commands I get no activity in the command box while I use my iphone 4S using siri. Can you please help me? Possible maybe a teamviewer session. my email is Vegeta99601@gmail.com so you can reply back. Thank you

    ReplyDelete
    Replies
    1. Did you ever figure out a solution to getting activity into the command box? I'm stuck here.

      Delete
  36. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
  37. Help!
    K:\SiriServer>ruby siriServer.rb
    siriServer.rb:40:in `unbind': undefined method `close' for nil:NilClass (NoMetho
    dError)
    from K:/Ruby193/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0.beta.4.1-x86
    -mingw32/lib/eventmachine.rb:1397:in `event_callback'
    from K:/Ruby193/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0.beta.4.1-x86
    -mingw32/lib/eventmachine.rb:179:in `run_machine'
    from K:/Ruby193/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0.beta.4.1-x86
    -mingw32/lib/eventmachine.rb:179:in `run'
    from siriServer.rb:73:in `'

    ReplyDelete
  38. Got everything running perfect, but as I was trying to run the server and grab the Tokens from the 4s it never pulled them from the device. Everything was perfect.. The script ran, the ruby file seemed to have worked, but no tokens got grabbed. Any suggestions?

    ReplyDelete
  39. only activities appeared , where am i suppposed to get the codes?

    ReplyDelete