Proxmark3 developers community

Research, development and trades concerning the powerful Proxmark3 device.

Remember; sharing is caring. Bring something back to the community.


"Learn the tools of the trade the hard way." +Fravia

You are not logged in.

#1 2020-06-27 20:09:04

Taha
Contributor
Registered: 2020-06-24
Posts: 10

Using an ARM Microcontroller instead of a PC (OS-Based platforms)

I want to eliminate the need for having a PC (OS-based platforms and the requirement for a software-client) as the Proxmark's controller. I want to use an STM Microcontroller (Or another ARM microcontroller) as the controller of proxmark3, sending and receiving commands over, but the commands as I sniffed the USB port (using Wireshark software)are coded into hex values, and the responses as well. I did not find any material regarding the protocol of the codded commands and the decoding of the codded returned data. Has anybody substituted PC with a microcontroller? If so, can you please share your codes? of not, any help and guidance in doing so would be highly appreciated? 
Moreover, can you please also help me where I can find CMD-based client source codes? (are those the ones in source codes of the MP3, client folder?)

My email: prooksima@gmail.com

Offline

#2 2020-06-27 20:38:15

iceman
Administrator
Registered: 2013-04-25
Posts: 6,473
Website

Re: Using an ARM Microcontroller instead of a PC (OS-Based platforms)

All usb commands is used differently,  you will need to go through all client side code to figure out exactly what each command communicates with the device.  There have been posts like that before,  but all ends up into the undocumented world of Proxmark source code. 
Happy searching!


If you feel the love,  https://www.patreon.com/iceman1001

modhex(hkhehghthbhudcfcdchkigiehgduiehg)

Offline

#3 2020-06-28 08:04:33

Taha
Contributor
Registered: 2020-06-24
Posts: 10

Re: Using an ARM Microcontroller instead of a PC (OS-Based platforms)

Thanks for your reply, but I could not find the source codes for the CMD-based Client (uncompiled). I don't mean source codes of GUI clients as they call CMD in their codes and do not do the coding and decoding process. Can you please point me to the right directory where I can find the source codes of the client-side? Moreover, how hard you think it is to implement just cloning part of the client on a Microcontroller, instead of using a PC? and is it just the matter of rewriting the client code compatibly with a Microcontroller?

Offline

#4 2020-06-28 09:22:31

iceman
Administrator
Registered: 2013-04-25
Posts: 6,473
Website

Re: Using an ARM Microcontroller instead of a PC (OS-Based platforms)

There has been several attempts to re-implement the pm3 client in to new programming languages over the years,   even for android apps like "Project Walrus" etc.  All have failed due to the amount of time needed.   I have seen one embedded (@cjbrigato) solution which does a pretty good job but still doesn't implement the full client. 

Your questions on how to limit the scope of a project is too broad to answer.  I would suggest you look at exactly what you want to run on your project and implement the bare minimum for that to work.   Its all down to source code reading.


If you feel the love,  https://www.patreon.com/iceman1001

modhex(hkhehghthbhudcfcdchkigiehgduiehg)

Offline

#5 2020-06-28 18:28:13

Taha
Contributor
Registered: 2020-06-24
Posts: 10

Re: Using an ARM Microcontroller instead of a PC (OS-Based platforms)

Thanks for your quick replies, By "re-implementing the pm3 client", I think you mean the GUI ones, which actually only add a Graphical surface to the CMD-based client, they actually call the CDM-based client within themselves. I want to reimplement a part of CMD-client, just as it is without any modifications, on an ARM microcontroller for the sake of portability and omitting the need for having an OS-required client such those have been implemented on various OSs.
Can you please share with me the link to the project of @cjbrigato? And can you also please provide me the link to the CMD-client source codes? All I can find are the compiled versions!

Offline

#6 2020-06-28 18:50:31

iceman
Administrator
Registered: 2013-04-25
Posts: 6,473
Website

Re: Using an ARM Microcontroller instead of a PC (OS-Based platforms)

I seem to not understand how it works,  you seem to have a pretty clear picture.


If you feel the love,  https://www.patreon.com/iceman1001

modhex(hkhehghthbhudcfcdchkigiehgduiehg)

Offline

#7 2020-06-29 05:57:01

wh201906
Contributor
Registered: 2020-04-29
Posts: 21

Re: Using an ARM Microcontroller instead of a PC (OS-Based platforms)

Here are some of my thoughts.
The header file "proxmark3/include/usb_cmd.h" and "proxmark3/client/hid-flasher/proxusb.h" might help.
When I try to sniff the communication between the client and PM3, it seems the length of every frame is fixed.
They might use the serial port to communicate, that's why the AndProx, a Android version of PM3 client, can use the native serial port library to communicate without root permission.
The easiest way might be using some tiny ARM chips which could run a linux system on it, then you just need to compile the PM3 on it.

Offline

#8 2020-06-29 06:10:40

wh201906
Contributor
Registered: 2020-04-29
Posts: 21

Re: Using an ARM Microcontroller instead of a PC (OS-Based platforms)

A Serial Monitor might help

Offline

#9 2020-06-29 07:47:08

mwalker
Moderator
Registered: 2019-05-11
Posts: 266

Re: Using an ARM Microcontroller instead of a PC (OS-Based platforms)

And can you also please provide me the link to the CMD-client source codes? All I can find are the compiled versions

Have you tried searching for github for the proxmark for the source code ?

Offline

#10 2020-06-29 13:52:45

Taha
Contributor
Registered: 2020-06-24
Posts: 10

Re: Using an ARM Microcontroller instead of a PC (OS-Based platforms)

wh201906 wrote:

A Serial Monitor might help

I'm actually using a Serial Monitor software, but, the commands and their responses are all coded hex values, which I can not understand the protocol to reimplement the protocol. Therefore I need the code indicating the coding protocol being used under CMD-based client. Any help in this regard?

Offline

#11 2020-06-29 13:56:32

Taha
Contributor
Registered: 2020-06-24
Posts: 10

Re: Using an ARM Microcontroller instead of a PC (OS-Based platforms)

mwalker wrote:

And can you also please provide me the link to the CMD-client source codes? All I can find are the compiled versions

Have you tried searching for github for the proxmark for the source code ?

Yes, I actually search it all but no clue. there is a folder in PM3 source codes namely "client", consisting of a bunch of C codes related to the receiving and parsing the commands. But I'm not sure if these are the source codes of the client. Can you check them out and steer me in the right direction?

Offline

#12 2020-06-29 14:13:31

Taha
Contributor
Registered: 2020-06-24
Posts: 10

Re: Using an ARM Microcontroller instead of a PC (OS-Based platforms)

wh201906 wrote:

Here are some of my thoughts.
The header file "proxmark3/include/usb_cmd.h" and "proxmark3/client/hid-flasher/proxusb.h" might help.
When I try to sniff the communication between the client and PM3, it seems the length of every frame is fixed.
They might use the serial port to communicate, that's why the AndProx, a Android version of PM3 client, can use the native serial port library to communicate without root permission.
The easiest way might be using some tiny ARM chips which could run a linux system on it, then you just need to compile the PM3 on it.

1)Good hints, thank you very much. Can you please tell me whether the folder "proxmark3/client/" is the source codes CMD-client running on windows? If yes. Can I just program an STM32 with them, kinda bringing the client up, on an STM32 as a plane Microcontroller that controls MP3?
2) The frame of commands is fixed but not the data (the responses to the commands)! I have not looked at the Android version PM3 client, but does not that call cmd client within itself?
3) Yes, that way it's easy, as I only would build the client on an OS-based ARM micro. But I want to eliminate the requirement for having an OS on my controller, making it pretty simple.

Offline

#13 2020-06-29 17:36:38

wh201906
Contributor
Registered: 2020-04-29
Posts: 21

Re: Using an ARM Microcontroller instead of a PC (OS-Based platforms)

Taha wrote:
wh201906 wrote:

Here are some of my thoughts.
The header file "proxmark3/include/usb_cmd.h" and "proxmark3/client/hid-flasher/proxusb.h" might help.
When I try to sniff the communication between the client and PM3, it seems the length of every frame is fixed.
They might use the serial port to communicate, that's why the AndProx, a Android version of PM3 client, can use the native serial port library to communicate without root permission.
The easiest way might be using some tiny ARM chips which could run a linux system on it, then you just need to compile the PM3 on it.

1)Good hints, thank you very much. Can you please tell me whether the folder "proxmark3/client/" is the source codes CMD-client running on windows? If yes. Can I just program an STM32 with them, kinda bringing the client up, on an STM32 as a plane Microcontroller that controls MP3?
2) The frame of commands is fixed but not the data (the responses to the commands)! I have not looked at the Android version PM3 client, but does not that call cmd client within itself?
3) Yes, that way it's easy, as I only would build the client on an OS-based ARM micro. But I want to eliminate the requirement for having an OS on my controller, making it pretty simple.

1. I‘m not very familiar with the source of PM3, but I guess that the /client folder is exactly the source code of PM3 client and it support various operating systems. You might need to change and add a lot of codes, such as the USB Host, to make a STM32 chip support these functions.(I'm new to STM32 now and I once had the same idea as yours, but it seems to be a tough task for me.)
2. I didn't notice the responses before. I think the AndProx still uses the code of /client and it replace the USB_HID module with the Android native libraries. Their codes might give you little inspiration.

Offline

#14 2020-06-29 20:05:18

Taha
Contributor
Registered: 2020-06-24
Posts: 10

Re: Using an ARM Microcontroller instead of a PC (OS-Based platforms)

wh201906 wrote:
Taha wrote:
wh201906 wrote:

Here are some of my thoughts.
The header file "proxmark3/include/usb_cmd.h" and "proxmark3/client/hid-flasher/proxusb.h" might help.
When I try to sniff the communication between the client and PM3, it seems the length of every frame is fixed.
They might use the serial port to communicate, that's why the AndProx, a Android version of PM3 client, can use the native serial port library to communicate without root permission.
The easiest way might be using some tiny ARM chips which could run a linux system on it, then you just need to compile the PM3 on it.

1)Good hints, thank you very much. Can you please tell me whether the folder "proxmark3/client/" is the source codes CMD-client running on windows? If yes. Can I just program an STM32 with them, kinda bringing the client up, on an STM32 as a plane Microcontroller that controls MP3?
2) The frame of commands is fixed but not the data (the responses to the commands)! I have not looked at the Android version PM3 client, but does not that call cmd client within itself?
3) Yes, that way it's easy, as I only would build the client on an OS-based ARM micro. But I want to eliminate the requirement for having an OS on my controller, making it pretty simple.

1. I‘m not very familiar with the source of PM3, but I guess that the /client folder is exactly the source code of PM3 client and it support various operating systems. You might need to change and add a lot of codes, such as the USB Host, to make a STM32 chip support these functions.(I'm new to STM32 now and I once had the same idea as yours, but it seems to be a tough task for me.)
2. I didn't notice the responses before. I think the AndProx still uses the code of /client and it replace the USB_HID module with the Android native libraries. Their codes might give you little inspiration.

So many thanks for your time and consideration.

Offline

#15 2020-06-30 02:22:36

wh201906
Contributor
Registered: 2020-04-29
Posts: 21

Re: Using an ARM Microcontroller instead of a PC (OS-Based platforms)

Taha wrote:

So many thanks for your time and consideration.

You are welcome. I used to have the same goal as yours and I'm happy that someone can make it possible.

Offline

#16 2020-06-30 02:38:26

wh201906
Contributor
Registered: 2020-04-29
Posts: 21

Re: Using an ARM Microcontroller instead of a PC (OS-Based platforms)

iceman wrote:

There has been several attempts to re-implement the pm3 client in to new programming languages over the years,   even for android apps like "Project Walrus" etc.  All have failed due to the amount of time needed.   I have seen one embedded (@cjbrigato) solution which does a pretty good job but still doesn't implement the full client. 

Your questions on how to limit the scope of a project is too broad to answer.  I would suggest you look at exactly what you want to run on your project and implement the bare minimum for that to work.   Its all down to source code reading.

I guess he might not need to migrate the whole project to other language? STM32 uses C language so he can just change some code about the client (such as the code about serial communication) and just compile it.
Anyway, I'm new in this forum with little knowledge of PM3, Electronics and Computer Sciences. I'm still exploring this project and I might make some unreasonable guess due to the lack of related knowledge. If it's offensive, I'm sorry about that.

Offline

#17 2020-06-30 06:53:41

Taha
Contributor
Registered: 2020-06-24
Posts: 10

Re: Using an ARM Microcontroller instead of a PC (OS-Based platforms)

wh201906 wrote:
iceman wrote:

There has been several attempts to re-implement the pm3 client in to new programming languages over the years,   even for android apps like "Project Walrus" etc.  All have failed due to the amount of time needed.   I have seen one embedded (@cjbrigato) solution which does a pretty good job but still doesn't implement the full client. 

Your questions on how to limit the scope of a project is too broad to answer.  I would suggest you look at exactly what you want to run on your project and implement the bare minimum for that to work.   Its all down to source code reading.

I guess he might not need to migrate the whole project to another language? STM32 uses C language so he can just change some code about the client (such as the code about serial communication) and just compile it.
Anyway, I'm new in this forum with little knowledge of PM3, Electronics, and Computer Sciences. I'm still exploring this project and I might make some unreasonable guess due to the lack of related knowledge. If it's offensive, I'm sorry about that.

Actually you are quite right, as the Client is in C language and it can be transformed on ARM microcontrollers, but there might some tricky parts to that, as the Client code uses Windows libraries.  That requires a lot of modifications!!!!! I guess. So if anybody is up in doing so, please raise a hand? smile

Last edited by Taha (2020-06-30 06:55:38)

Offline

Board footer

Powered by FluxBB