investigations | Indicators from Amnesty International 's investigations | Cybersecurity library
kandi X-RAY | investigations Summary
kandi X-RAY | investigations Summary
This repository contains indicators of compromise extracted from some of Amnesty International's technical investigations in targeted threats against human rights defenders.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Decode the contents of the TLV .
- Extract APK configuration .
- Extract the configuration from the DEX file .
- Decode the config into a dictionary .
- Parse source code .
- Extract obfuscated strings from method invocation .
- Decode array with given index .
- Unpack data into a binary string .
- Get an attribute from the stream .
- Return a representation of o .
investigations Key Features
investigations Examples and Code Snippets
(0)[8196:kworker/0:3]hid (null): transport driver missing .raw_request()
(0)[8196:kworker/0:3][g_android]can't add hid device: -22
(0)[8196:kworker/0:3][g_android]can't add HID deviceffffffc05bda8480
static struct hid_ll_driver acc_hid_ll_driver = {
https://www.example1.com
https://www.example2.com
https://www.example3.com
urlscanio -b test.txt
urlscanio --batch-investigate test.txt
Community Discussions
Trending Discussions on investigations
QUESTION
I have been testing UART communication in C++ with wiringPi.
The problem:
It seems that C++ isn't outputting whole data into the UART port /dev/ttyAMA0
. Perhaps I'm doing it the wrong way?
Investigations:
Note : I am using minicom, minicom --baudrate 57600 --noinit --displayhex --device /dev/ttyAMA0
to check the received data.
Also! The UART port, RX & TX pins are shorted together.
The python code worked perfectly however when I tried to implement it in C++, the data received is different.
The expected received data should be: ef 01 ff ff ff ff 01 00 07 13 00 00 00 00 00 1b
.
Code used
Python:
...ANSWER
Answered 2021-Jun-05 at 14:57You can't use serialPuts
to send the null terminator. As with all similar functions, it will stop when the null terminator is encountered in the string. In this case I think your best option is to add a function that uses the ordinary write
function that is used internally by WiringPi's own functions.
You could make a wrapper function to make it look similar to the other calls:
QUESTION
I'm working on a project which has to create a pdf. In some places there should be spaces between lines. But I can't find a way to do that. I tried adding an empty Text widget between lines to get with spaces in side them. But it didn't took that line as there are only empty spaces. Currently I'm adding a dot in the Text widget to get spaces. Is there any other way to do that?
Link to the pdf package: https://pub.dev/packages/pdf
This is the code I use to create the pdf.
...ANSWER
Answered 2021-Jun-01 at 14:32There's an issue on the repo about adding space between 2 paragraphs.
The author suggests using:
QUESTION
This code works fine to conditionally require the isDirty
field to be part of a lecture object:
- If
id
is of typestring
, I must add anisDirty
field: - If
id
is of typenumber
, I cannot add anisDirty
field to the object.
ANSWER
Answered 2021-May-20 at 19:58Let me take these questions one by one:
We see in the last sentence that it says that
isDirty
is required. But this does not seem right to me! Its type isnever
-> So it should never be required, shouldn't it?
There is nothing unique about the never
type in terms of how it interacts with optional object properties. You can think of never
as the same as any other type (string
, number,
etc.). The difference is that unlike these other types, there are no values that are assignable to never
. You might say that a variable of type never
can "never" be assigned a valid value.
But to my surprise the error remains! Doesn't the
?
in e.g.a?: string
equala: string | undefined
?
No. Consider the difference between the two objects: {}
and {a: undefined}
. In one case the key is missing, completely. In the other it exists and has the value undefined
. The former object is assignable to {a?: string}
but not to {a: string | undefined}
.
This leads to:
why the question mark
?
is necessary here in the first place andisDirty: never;
is basically impossible.
Like in the above example, if you do not include the ?
on the key name, then the key is required in the type. The key simply has to be present. But the type of that key's value is never
. Because of that, there are no valid values you could assign to that key.
So in short, it is indeed impossible without a question mark, as it is a contradiction of requirements: that key must exist, but no value is valid for it.
Finally:
why
?
behaves differently when it's used together withnever
.
This is merely a consequence of the usual properties of never
combined with the usual behavior of ?
. There is nothing special about the interaction of these two particular features.
Using the example of {isDirty?: never}
, this means that one of the following must be true:
- The object does not include the
isDirty
key. - The object does include the
isDirty
key and it has a value of typenever
.
Since the second of those two cases is impossible (by the above arguments), that leaves only the first case: an object matching this type must not contain the isDirty
key.
QUESTION
I want to echo
all *.jpg
files, except for *-.jpg
, so for that I made this command:
ANSWER
Answered 2021-Apr-30 at 20:41Run the filenames through find.exe
and omit those that contain -.jpg. The /V switch tells find.exe
to omit lines where the string is found. Using findstr.exe
uses a regex which can ensure that it is only found at the end of the filename. As always, use FIND /?
and FINDSTR /?
to read all about it.
QUESTION
I'm trying to submit my Pyspark application to a Kubernetes cluster (Minikube) using spark-submit:
...ANSWER
Answered 2021-Apr-28 at 11:49Did you start out with the official Dockerfile (kubernetes/dockerfiles/spark/bindings/python/Dockerfile) as described in the Docker images section of the documentation? You also need to specify an upload location on a Hadoop-compatible filesystem and make sure that the specified Ivy home and cache directories have the correct permissions, as described in the Dependency Management section.
Example from the docs:
QUESTION
My Spring Boot REST endpoint returns HTTP status immediately but sometimes waits 60 seconds before returning the result.
This is caused by a Feign-proxied request's headers being altered (Transfer-Encoding
being replaced with Content-Length
)
The context and results of the investigation are detailed below.
- A (Spring Boot + Feign + Tomcat) -> Traefik -> B (Rest resource, Spring Boot + Tomcat)
- Traefik & B always respond immediately, A always returns the 200 status code immediately.
- Based on unknown criteria, A uses a KeepAlive stream and returns only after precisely 60 seconds (max idle thread?).
- B uses the
Transfer-Encoding: chunked
header, but Traefik replaces it withContent-Length
depending on unknown criteria. - The pause comes from a KeepAliveStream not being closed. I found several workarounds/solutions, but I'd love to have an explanation also.
- Removing the
Content-Length
header solves the issue. Debugging sun.www.net.HttpClient confirms that having aContent-Length
header triggers the use of a KeepAlive stream. - Calling A with the
Connection: close
header seems to solve the issue (same reason: this prevents the use of the KeepAliveStream). - Replacing Tomcat with Jetty in A seems to solve the issue, as it seems to rely on other HTTP libs.
- Replacing A's Feign's Apache HttpClient with OkHttp solves the problem.
- Removing the
- Why doesn't Feign/Tomcat/HttpClient close once the whole body is available (which is immediately)?
- Bonus question: Why/When/Based on what does Traefik alter the headers, and what are the rules?
One of our latest tests was to use -v
with curl and we saw this while A was pausing:
ANSWER
Answered 2021-Apr-27 at 10:49We've finally understood the mechanism that leads to the issue.
A -> Traefik -> B
- B returns a list of objects with a ZonedDateTime field (
"validFrom":"2021-12-24 23:59:57+01:00"
) and the headerTransfer-Encoding: chunked
. - Traefik replaces the
Transfer-Encoding: chunked
with aContent-Length
, computed from the body of the request. - A receives the response, deserializes the objects, then reserializes them but in the UTC timezone (
"validFrom":"2021-12-24 22:59:57Z"
), but it reuses theContent-Length
from Traefik without recalculating it.
As a consequence, the body from is shorter than the announced Content-Length
(each ZonedDateTime takes five bytes less when A sends it than when Traefik computes the content length).
The client however has been announced a Content-Length
and is waiting for the missing bytes.
The solution we have in mind right now is to tell Feign and its calling controller that it returns a ResponseEntity
instead of a ResponseEntity>
.
Pros:
- B's response is returned as-is, so no more problem due to a varying content length.
- A does not spend CPU-time deserializing then immediately reserializing the response.
Cons:
- The OpenApi doc of A won't show the type of return (unless the Open API annotation allow to specify the return model). That's what I'll test later today.
QUESTION
One of our system has a micro service architecture using Apache Kafka as a service bus. Low latency is a very important factor but reliability and consistency (exactly once) are even more important.
When we perform some load tests we noticed signifiant performance degradation and all investigations pointed to big increases in Kafka topics producer and consumer latencies. No matter how much configuration we changed or more resources we added we could not get rid of the symptoms.
At the moment our needs are processing 10 transactions per second (TPS) and the load test is exercising 20 TPS but as the system is evolving and adding more functionality we know we'll reach a stage when the need will be 500TPS so we started being worried if we can achieve this with Kafka.
As a proof of concept I tried to switch to one of our micro services to use a chronicle-queue instead of a Kafka topic. It was easy to migrate following the avro example as from Chronicle-Queue-Demo git hub repo
...ANSWER
Answered 2021-Apr-20 at 01:55Hand building the Avro object each time seems a bit of a code smell to me.
Can you create a predefined message -> avro serializer and use that to feed the queue?
Or, just for testing, create one avro object outside the loop and feed that one object into the queue many times. That way you can see if it is the building or the queuing which is the bottleneck.
More general advice:
Maybe attach a profiler and see if you are making an excessive amount of object allocations. Which is particularly bad if they are getting promoted to higher generations.
See if they are your objects or Chronicle Queue ones.
Is your code maxing out your ram or cpu (or network)?
QUESTION
I am working with Parse Server and am trying to speed up queries that use a bloom filter.
Each document has a field bf
with number value in range 0...bloomSize, for example document Id "xyz" is hashed as bf = 6462
The query then loads binary bloom filter values that are encoded and saved in base64 string. To make use of indexed query in Parse Server / MongoDB I need to generate an array of integers that I can compare then with the above mentioned field. So the base64 string needs to be decoded and for each 0 in binary data I have to append an integer of that 0 value position. Currently I am using following snippet:
...ANSWER
Answered 2021-Apr-17 at 06:53It should improve a bit when you avoid the conversion to string with .toString(2)
. Also the repeated i*8+l
can be avoided by using a separate counter variable:
QUESTION
I use grc
to colorify the results of ls
command.
For the moment, I have the following rule to display the text in white foreground on blue background. I did for this :
...ANSWER
Answered 2021-Apr-16 at 06:57From reading the sourcecode on https://github.com/garabik/grc/blob/master/grcat (lines 157-165)
You can see grc dosen't consider lines that start with # or \n to start new rules only lines with other non letter characters, and if you look at other examples they separate their rules with =======
This is why only your last rule ever applied since they weren't separated properly they were overwriting each other
It should work when separated like this
QUESTION
My application has a navigation drawer. From drawer options, I am opening different activities. At that time a blank screen is displayed before the new Activity.
@Override public boolean onNavigationItemSelected(@NonNull MenuItem item) {
...ANSWER
Answered 2021-Apr-13 at 18:01Have you tried passing GRAVITY.START
as a parameter to drawer.close(int gravity)
, like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install investigations
You can use investigations like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page