Splunk SOAR (f.k.a. Phantom)

What is the cause of image not displayed in screeenshotmachine?

kaede_oogami
Explorer

Hi all,

I am trying to use the screenshot machine API to get an
The image is not displayed properly.

We have confirmed that the API is working properly and
The execution history shows the file size and the path to the vault file, so we believe that the screenshot was taken successfully.

Does anyone know the cause?

日本語訳

お世話になります。

screenshot machineのAPIを利用し、
画像を取得しても、うまく表示がされません。

APIのテストは成功しており、アクションの詳細を確認しても、

ファイルサイズとvaultファイルのパスが
確認できるため、スクリーンショットの取得は成功していると思われます。

どなたか原因をご存知の方はいらっしゃいますか?

スクショ_20221017_2.png

0 Karma
1 Solution

phanTom
SplunkTrust
SplunkTrust

This issue has been resolved in the latest version: 

2022-10-14PSAAS-10340Screenshot Machine app does not show screenshot in app widget after running action

https://docs.splunk.com/Documentation/SOARonprem/5.4.0/ReleaseNotes/FixedIssues 

View solution in original post

millarma
Path Finder

My Japanese is not perfect, I will try in both languages.
日本語はすみませんが。。。

Do you know the event ID where this action was performed?

この画像を取得したアクションのevent ID を知っていますか?

Usually, you access the contents of a vault via the event(container) it is attached to.  In the GUI, this means opening Sources > click on Event that the screenshotmachine action took place in, and view it in Files tab.  
普通にはvaultの内容にはeventを開いて見ることにします。最初にGUIではソースを開き、screenshotmachine の画像を取得したアクションのeventにクリックをします。そうして、下にあるscreenshotの見たようなスクリーンが見られるでしょう。でActivityやFilesなどのところでscreenshotmachineのスクリーンショットがあるんです。
screenshotexample.jpg

It CAN be done via the REST API, but it is very clunky.  There are a few ways but if all you have is the vault information:

RESTAPIをすることもできますがちょっと扱いにくいと思います。標準ワークフローではありませんし。でもscreenshotmachineのアクションは成功するために使うでしょう。

VAULT_FILE_PATHをしてダウンロードをするURLのかたちは下です。
https://YOURPHANTOMHOSTNAME.DOMAIN.COM/download?document={vault_file_path}

for your screenshot below, this would be:

元のメッセージからのVAULT_FILE_PATHを入れたら:
https://YOURPHANTOMHOSTNAME.DOMAIN.COM/download?document=/opt/vault/51/37/209e0358057f0b921aac365f70...

When you download via vault file path, you get a tgz of the file system, with a file named 209e0358057f0b921aac365f70b17f0e067d90a4. this file can be opened in a browser.

VAULT_FILE_PATHをつかって.tgzファイルが出てきます。そのファイルを解凍すると、/opt/vault/51/37 という名前のディレクトリと、ファイル拡張子のない  209e0358057f0b921aac365f70b17f0e067d90a4というファイルが表示されます。そのファイルはブラウザで開くことができます。


My advice is to find the event the screenshot is connected to.

スクリーンショットが接続されているeventを見つけたほうがいいと思います。

0 Karma

kaede_oogami
Explorer

Thank you for your response.
I was able to see the screenshotmachine screenshot in activities, files, etc.

However, the widget still does not show the screenshotmachine image.
(The screenshot changes to an icon).

Is there any way to fix this?

0 Karma

millarma
Path Finder

Since the screenshot is turning into an icon, I wonder if it is the browser is unable to decode the file.  

 

What browser are you using?  Can you try another or update the current browser?

 

Are you able to download the file via the REST command I shared?  Are you able to view it that way?

 

 

0 Karma

kaede_oogami
Explorer

We use the latest version of Google Chrome (107.5304.88) as our browser.

I also tried another browser (Edge), but the screenshot here also icon.

I tried the REST API with the following format, but got "Status=500 Server Error".
(Vault file paths are adapted to my environment)

https://YOURPHANTOMHOSTNAME.DOMAIN.COM/download?
document=/opt/phantom/vault/51/37/209e0358057f0b921aac365f70... 209e0358057f0b921aac365f70b17f0e067d90a

One thing I noticed is that the file path you provided is "/opt/vault/51/37/~".
In my environment, it is in the format "/opt/phantom/vault/~".

I am installing Splunk SOAR using CentOS, is it possible that it is installed in the wrong location?
(I am translating from Japanese, so if you can turn a blind eye to the grammar...)

0 Karma

millarma
Path Finder

You are correct, I see I made an error.  I dropped the 'phantom' segment of the url.  May I assume you caught my error and tried it anyway, with the correct URL?
あ、たしかに、間違えたようですね。URLのPHANTOMっいう部分を入れ忘れました。kaede_oogamiさんは間違い気づいて正しいURLをしてみたでしょうね。

I do not think you installed the application in the wrong location, at least I can see no evidence to suggest that.  I would expect the vault_file_path value to be EXACTLY as it appears in your screenshot.

間違った場所にアプリケーションをインストールしたとは思わない、少なくともそれを示唆する証拠はないと思います。vault_file_pathとは、スクリーンショットに表示されているとおりであることだと思います。


Putting that aside for a moment, here is another way you can download the screen shot object.  Please open the event that contains the screenshotmachine action and the file  object it created.   I have uploaded a screenshot for reference.  
少し脇に置いて、スクリーンショットのファイルをダウンロードする別の方法があります。スクリーンショットマシンアクションとそ作成したファイルを含むeventを開いてください。 私が参考のためにスクリーンショットをアップロードしました。
screenshotexamplev2.jpg
If you click on the Files (1) section, you will see a list of file objects, it should include the screenshot you took with screenshotmachine.
FILESというセクションをクリックすると、ファイルのリストが表示され、スクリーンショットマシンで撮影したスクリーンショットが含まれているはずです。

Do you see the ellipsis to the right, I have put a (2) next to it.  If you click on that, you can download the file object and then try to open it with other programs.
それで右側に'...'(省略記号)が表示されていますか?そこに(2)を付けて置きました。 それをクリックすると、ファイルをダウンロードして、そうすると他のプログラムで開いてみることができます。

I don't know what the target URL site is but it is possible that it is not an image file but some sort of a payload, some script or code.  In that case it might not decode into an image.
ターゲットURLサイトが何であるかはわかりませんが、画像ファイルではなく、なにかのペイロード、スクリプト、またはコードである可能性があります。 その場合、イメージにデコードされない可能性があります。


Are you able to get screenshots of other websites?  Do you know how to create 'test' events in SOAR and use the 'ACTION' button to manually run a screenshot action? 
他のウェブサイトのスクリーンショットを取得できますか? SOARで「テスト」イベントを作成し、「アクション」ボタンを使用してスクリーンショットアクションを手動で実行する方法を知っていますか?

0 Karma

kaede_oogami
Explorer

From "File," you could download a screenshot.

Next, I executed the "Action" button and
I tried to get a screenshot from a site such as Splunk.
The situation did not change and the icon was still displayed.

0 Karma

millarma
Path Finder

Ok, good to know, the problem not specific to this one url.  

 

So you said you could download the file.  Are you able to view it with any other programs, like with a browser, or photo shop?  How about if you add .jpg to the end?

 

In my testing, the object I downloaded had no file extension, the default encoding screenshot machine uses is jpg.  On my test installation, I did not define a file naming convention, I don't recall them being .jpg though. 

 

I might be tempted to try a different screenshot app and test it.  Maybe this one:https://splunkbase.splunk.com/app/5444

 

If you use screenshot machine web interface to grab a screenshot, does it work there?

 

 

0 Karma

phanTom
SplunkTrust
SplunkTrust

This issue has been resolved in the latest version: 

2022-10-14PSAAS-10340Screenshot Machine app does not show screenshot in app widget after running action

https://docs.splunk.com/Documentation/SOARonprem/5.4.0/ReleaseNotes/FixedIssues 

kaede_oogami
Explorer

Thank you!

I was able to verify the screenshot image.

Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...