operatorequals/covertutils

A StegoOrchestrator example wanted

dalifooder opened this issue · 9 comments

The document of StegoInjector and StegoOrchestrator is puzzles me. Can you give a example?

Hello!
Some documentation has been added.
https://covertutils.readthedocs.io/en/latest/covertutils.orchestration.html#module-covertutils.orchestration.stegoorchestrator

It is not complete but it may help. I do not have enough time to properly document the whole project yet, but it is in the TODOs to make a decent rtfd page!

An example will be ready as a new project implementing TCP stego shell. Probably in a new repo.

I think this project really cool if you can implement all the features as you said in README.
Looking forward to seeing your progress.

Thanks a lot!
Every feature mentioned is implemented. Unfortunately they aren't documented yet.
For the time being you can sneak on the source code for the explanation of several things.
I am also preparing a blog post at Securosophy (my blog) fully explaining the internals.

I have read the source code and your newest blog.
Your code is elegant and readable. NICE!
But it makes me even more confused, the stream concept in your blog, is A sequence of such tags is called a Stream. , the template concept in the documentation, is packet_template_name = '''Hex of the template packet with Tag Letters among the valid bytes'''.
How can you place them in the same one list and called 'streams'?
I print it out and find this

  super( StegoOrchestrator, self ).__init__( passphrase, tag_length, cycling_algorithm, streams, reverse )
  self.__simple_orchestrators = {}
  print 'stego_orch 54', streams
  for index, template in enumerate( streams ) :
  	print 'stego_orch 55',index, template

The output:

  stego_orch 54 ['control', 'ip_tcp_syn']
  stego_orch 55 0 control
  stego_orch 55 1 ip_tcp_syn

In my comprehension, the stream is a more abstract concept, the template is a definite concept, I can't understand why you code like this.

SO, can you release more detailed documentation ?

Hello. At this very moment I am working on Bug Fixing and documentation of Stego* classes.

You are absolutely right. The use of streams with the StegoOrchestrator class is redundant at best. It worked as a PoC, when I first wrote the class, and I moved on. It has to be changed.
Really thank you for figuring this out for me! You motivate me.

If you have any idea on how to keep the Orchestrator's readyMessage() signature the same in StegoOrchestrator and make the template - stream relation 1-many, consider making a pull request.
I am gonna fix this (it has to be changed anyway, for the shell implementation I want to implement), but (I won't lie) it will take some time, as I am currently working on Component Documentation.

Thanks again

Check my last commit on the Stream-Template subject.
ce4e25f

I tried to build a runable StegoOrchestrator example as those pairs in the examples folder but failed. I found It's difficult to play with RAW packet without stream control, How are you going to solve the problem?

Hello.
With the current design it is not that easy to refactor StegoOrchestrator. Work is being done toward the stream-template logical split though.
I created the AdHocChunker class (subpackage: covertutils.datamanipulation) to use instead of the standard Chunker class.
In case that you are trying to solve that problem yourself, I highly suggest to use the AdHocChunker.

Thank you for your interest!

A full fledged example of the StegoOrchestrator class is available at
http://covertutils.readthedocs.io/en/latest/prog_examples.html#advanced-http-reverse-shell