From 6532b0234e86ccb4b0982bdd997d88216d0b379e Mon Sep 17 00:00:00 2001 From: Ryan Edward Kozak Date: Mon, 5 Aug 2024 14:18:52 -0700 Subject: [PATCH] Fix failing open source requirements. Summary: The open source automated [repository](https://www.internalfb.com/intern/opensource/github/repo/723666528690502/) checkup has been flagging certain files as needing a copyright header. Fixes the following: https://www.internalfb.com/phabricator/paste/view/P1404169236 ``` COPYRIGHT_HEADERS_EXIST: Copyright Headers **************************************** FIX IT! https://our.intern.facebook.com/intern/opensource/github/repo/723666528690502/repo_settings/header_exemptions/ Every project specific source file must contain a doc block with an appropriate copyright header. Unrelated files must be listed as exceptions in the Copyright Headers Exceptions page in the repo dashboard. A copyright header clearly indicates that the code is owned by Meta. Every open source file must start with a comment containing "Meta Platforms, Inc. and affiliates" https://github.com/facebookincubator/ForgeArmory/blob/main/ttps/cred-and-key-mgmt/macos/dump-ff-cookies/JXA-Firefox.js: The first 16 lines of 'ttps/cred-and-key-mgmt/macos/dump-ff-cookies/JXA-Firefox.js' do not contain the patterns: (Meta Platforms, Inc. and affiliates)|(Facebook, Inc(\.|,)? and its affiliates)|([0-9]{4}-present(\.|,)? Facebook)|([0-9]{4}(\.|,)? Facebook) Copyright https://github.com/facebookincubator/ForgeArmory/blob/main/ttps/cred-and-key-mgmt/macos/keysearch/keysearch.swift: The first 16 lines of 'ttps/cred-and-key-mgmt/macos/keysearch/keysearch.swift' do not contain the patterns: (Meta Platforms, Inc. and affiliates)|(Facebook, Inc(\.|,)? and its affiliates)|([0-9]{4}-present(\.|,)? Facebook)|([0-9]{4}(\.|,)? Facebook) Copyright https://github.com/facebookincubator/ForgeArmory/blob/main/ttps/cred-and-key-mgmt/macos/prompt-api/prompt-api.swift: The first 16 lines of 'ttps/cred-and-key-mgmt/macos/prompt-api/prompt-api.swift' do not contain the patterns: (Meta Platforms, Inc. and affiliates)|(Facebook, Inc(\.|,)? and its affiliates)|([0-9]{4}-present(\.|,)? Facebook)|([0-9]{4}(\.|,)? Facebook) Copyright https://github.com/facebookincubator/ForgeArmory/blob/main/ttps/cred-and-key-mgmt/macos/tcc-access-check-api/tcc-access-check-api.swift: The first 16 lines of 'ttps/cred-and-key-mgmt/macos/tcc-access-check-api/tcc-access-check-api.swift' do not contain the patterns: (Meta Platforms, Inc. and affiliates)|(Facebook, Inc(\.|,)? and its affiliates)|([0-9]{4}-present(\.|,)? Facebook)|([0-9]{4}(\.|,)? Facebook) Copyright https://github.com/facebookincubator/ForgeArmory/blob/main/ttps/defense-evasion/linux/load-rootkit/rootkit.c: The first 16 lines of 'ttps/defense-evasion/linux/load-rootkit/rootkit.c' do not contain the patterns: (Meta Platforms, Inc. and affiliates)|(Facebook, Inc(\.|,)? and its affiliates)|([0-9]{4}-present(\.|,)? Facebook)|([0-9]{4}(\.|,)? Facebook) Copyright https://github.com/facebookincubator/ForgeArmory/blob/main/ttps/defense-evasion/macos/injectdylib/calc.c: The first 16 lines of 'ttps/defense-evasion/macos/injectdylib/calc.c' do not contain the patterns: (Meta Platforms, Inc. and affiliates)|(Facebook, Inc(\.|,)? and its affiliates)|([0-9]{4}-present(\.|,)? Facebook)|([0-9]{4}(\.|,)? Facebook) Copyright https://github.com/facebookincubator/ForgeArmory/blob/main/ttps/defense-evasion/macos/injectdylib/injectdylib.swift: The first 16 lines of 'ttps/defense-evasion/macos/injectdylib/injectdylib.swift' do not contain the patterns: (Meta Platforms, Inc. and affiliates)|(Facebook, Inc(\.|,)? and its affiliates)|([0-9]{4}-present(\.|,)? Facebook)|([0-9]{4}(\.|,)? Facebook) Copyright https://github.com/facebookincubator/ForgeArmory/blob/main/ttps/defense-evasion/macos/run-dylib/calc.c: The first 16 lines of 'ttps/defense-evasion/macos/run-dylib/calc.c' do not contain the patterns: (Meta Platforms, Inc. and affiliates)|(Facebook, Inc(\.|,)? and its affiliates)|([0-9]{4}-present(\.|,)? Facebook)|([0-9]{4}(\.|,)? Facebook) Copyright https://github.com/facebookincubator/ForgeArmory/blob/main/ttps/defense-evasion/macos/run-dylib/rundylib.swift: The first 16 lines of 'ttps/defense-evasion/macos/run-dylib/rundylib.swift' do not contain the patterns: (Meta Platforms, Inc. and affiliates)|(Facebook, Inc(\.|,)? and its affiliates)|([0-9]{4}-present(\.|,)? Facebook)|([0-9]{4}(\.|,)? Facebook) Copyright https://github.com/facebookincubator/ForgeArmory/blob/main/ttps/defense-evasion/macos/sshkeygen-load-dylib/calc.c: The first 16 lines of 'ttps/defense-evasion/macos/sshkeygen-load-dylib/calc.c' do not contain the patterns: (Meta Platforms, Inc. and affiliates)|(Facebook, Inc(\.|,)? and its affiliates)|([0-9]{4}-present(\.|,)? Facebook)|([0-9]{4}(\.|,)? Facebook) Copyright https://github.com/facebookincubator/ForgeArmory/blob/main/ttps/defense-evasion/macos/tcl-load-dylib/calc.c: The first 16 lines of 'ttps/defense-evasion/macos/tcl-load-dylib/calc.c' do not contain the patterns: (Meta Platforms, Inc. and affiliates)|(Facebook, Inc(\.|,)? and its affiliates)|([0-9]{4}-present(\.|,)? Facebook)|([0-9]{4}(\.|,)? Facebook) Copyright https://github.com/facebookincubator/ForgeArmory/blob/main/ttps/discovery-and-collection/macos/clipdump-api/clipdump-api.swift: The first 16 lines of 'ttps/discovery-and-collection/macos/clipdump-api/clipdump-api.swift' do not contain the patterns: (Meta Platforms, Inc. and affiliates)|(Facebook, Inc(\.|,)? and its affiliates)|([0-9]{4}-present(\.|,)? Facebook)|([0-9]{4}(\.|,)? Facebook) Copyright https://github.com/facebookincubator/ForgeArmory/blob/main/ttps/discovery-and-collection/macos/swiftbelt-exec/SwiftBelt.swift: The first 16 lines of 'ttps/discovery-and-collection/macos/swiftbelt-exec/SwiftBelt.swift' do not contain the patterns: (Meta Platforms, Inc. and affiliates)|(Facebook, Inc(\.|,)? and its affiliates)|([0-9]{4}-present(\.|,)? Facebook)|([0-9]{4}(\.|,)? Facebook) Copyright https://github.com/facebookincubator/ForgeArmory/blob/main/ttps/discovery-and-collection/macos/swiftspy-exec/expect.exp: The first 16 lines of 'ttps/discovery-and-collection/macos/swiftspy-exec/expect.exp' do not contain the patterns: (Meta Platforms, Inc. and affiliates)|(Facebook, Inc(\.|,)? and its affiliates)|([0-9]{4}-present(\.|,)? Facebook)|([0-9]{4}(\.|,)? Facebook) Copyright https://github.com/facebookincubator/ForgeArmory/blob/main/ttps/discovery-and-collection/macos/swiftspy-exec/swiftspy.swift: The first 16 lines of 'ttps/discovery-and-collection/macos/swiftspy-exec/swiftspy.swift' do not contain the patterns: (Meta Platforms, Inc. and affiliates)|(Facebook, Inc(\.|,)? and its affiliates)|([0-9]{4}-present(\.|,)? Facebook)|([0-9]{4}(\.|,)? Facebook) Copyright https://github.com/facebookincubator/ForgeArmory/blob/main/ttps/persistence/macos/launchagent/launchagent.swift: The first 16 lines of 'ttps/persistence/macos/launchagent/launchagent.swift' do not contain the patterns: (Meta Platforms, Inc. and affiliates)|(Facebook, Inc(\.|,)? and its affiliates)|([0-9]{4}-present(\.|,)? Facebook)|([0-9]{4}(\.|,)? Facebook) Copyright https://github.com/facebookincubator/ForgeArmory/blob/main/ttps/persistence/macos/loginitem/cleanuploginitem.swift: The first 16 lines of 'ttps/persistence/macos/loginitem/cleanuploginitem.swift' do not contain the patterns: (Meta Platforms, Inc. and affiliates)|(Facebook, Inc(\.|,)? and its affiliates)|([0-9]{4}-present(\.|,)? Facebook)|([0-9]{4}(\.|,)? Facebook) Copyright https://github.com/facebookincubator/ForgeArmory/blob/main/ttps/persistence/macos/loginitem/loginitem.swift: The first 16 lines of 'ttps/persistence/macos/loginitem/loginitem.swift' do not contain the patterns: (Meta Platforms, Inc. and affiliates)|(Facebook, Inc(\.|,)? and its affiliates)|([0-9]{4}-present(\.|,)? Facebook)|([0-9]{4}(\.|,)? Facebook) Copyright ``` Differential Revision: D60787687 --- .../lambda-function.py | 17 +++++++++++++++++ .../macos/dump-ff-cookies/JXA-Firefox.js | 19 +++++++++++++++++++ .../macos/keysearch/keysearch.swift | 19 +++++++++++++++++++ .../macos/prompt-api/prompt-api.swift | 19 +++++++++++++++++++ .../tcc-access-check-api.swift | 19 +++++++++++++++++++ ttps/defense-evasion/macos/injectdylib/calc.c | 19 +++++++++++++++++++ .../macos/injectdylib/injectdylib.swift | 19 +++++++++++++++++++ ttps/defense-evasion/macos/run-dylib/calc.c | 19 +++++++++++++++++++ .../macos/run-dylib/rundylib.swift | 19 +++++++++++++++++++ .../macos/sshkeygen-load-dylib/calc.c | 19 +++++++++++++++++++ .../macos/tcl-load-dylib/calc.c | 19 +++++++++++++++++++ .../macos/clipdump-api/clipdump-api.swift | 19 +++++++++++++++++++ .../macos/swiftspy-exec/expect.exp | 17 +++++++++++++++++ .../macos/swiftspy-exec/swiftspy.swift | 19 +++++++++++++++++++ .../macos/launchagent/launchagent.swift | 19 +++++++++++++++++++ .../macos/loginitem/cleanuploginitem.swift | 19 +++++++++++++++++++ .../macos/loginitem/loginitem.swift | 19 +++++++++++++++++++ 17 files changed, 319 insertions(+) diff --git a/ttps/cloud/aws/lambda/backdoor-lambda-version-and-API/lambda-function.py b/ttps/cloud/aws/lambda/backdoor-lambda-version-and-API/lambda-function.py index ef947af..b5b180f 100644 --- a/ttps/cloud/aws/lambda/backdoor-lambda-version-and-API/lambda-function.py +++ b/ttps/cloud/aws/lambda/backdoor-lambda-version-and-API/lambda-function.py @@ -1,3 +1,20 @@ +# Copyright © 2023-present, Meta Platforms, Inc. and affiliates +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + import os diff --git a/ttps/cred-and-key-mgmt/macos/dump-ff-cookies/JXA-Firefox.js b/ttps/cred-and-key-mgmt/macos/dump-ff-cookies/JXA-Firefox.js index 9ec97d0..0f6ff61 100644 --- a/ttps/cred-and-key-mgmt/macos/dump-ff-cookies/JXA-Firefox.js +++ b/ttps/cred-and-key-mgmt/macos/dump-ff-cookies/JXA-Firefox.js @@ -1,3 +1,22 @@ +/* + Copyright © 2023-present, Meta Platforms, Inc. and affiliates + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + ObjC.import('sqlite3'); ObjC.import('Foundation'); diff --git a/ttps/cred-and-key-mgmt/macos/keysearch/keysearch.swift b/ttps/cred-and-key-mgmt/macos/keysearch/keysearch.swift index a2a682e..022c357 100644 --- a/ttps/cred-and-key-mgmt/macos/keysearch/keysearch.swift +++ b/ttps/cred-and-key-mgmt/macos/keysearch/keysearch.swift @@ -1,4 +1,23 @@ // @nolint +/* + Copyright © 2023-present, Meta Platforms, Inc. and affiliates + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import Foundation import Cocoa import SQLite3 diff --git a/ttps/cred-and-key-mgmt/macos/prompt-api/prompt-api.swift b/ttps/cred-and-key-mgmt/macos/prompt-api/prompt-api.swift index b15fcba..c5c8c63 100644 --- a/ttps/cred-and-key-mgmt/macos/prompt-api/prompt-api.swift +++ b/ttps/cred-and-key-mgmt/macos/prompt-api/prompt-api.swift @@ -1,4 +1,23 @@ // @nolint +/* + Copyright © 2023-present, Meta Platforms, Inc. and affiliates + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import Foundation import Cocoa diff --git a/ttps/cred-and-key-mgmt/macos/tcc-access-check-api/tcc-access-check-api.swift b/ttps/cred-and-key-mgmt/macos/tcc-access-check-api/tcc-access-check-api.swift index 553726f..2751654 100644 --- a/ttps/cred-and-key-mgmt/macos/tcc-access-check-api/tcc-access-check-api.swift +++ b/ttps/cred-and-key-mgmt/macos/tcc-access-check-api/tcc-access-check-api.swift @@ -1,4 +1,23 @@ // @nolint +/* + Copyright © 2023-present, Meta Platforms, Inc. and affiliates + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import Foundation import Cocoa import SQLite3 diff --git a/ttps/defense-evasion/macos/injectdylib/calc.c b/ttps/defense-evasion/macos/injectdylib/calc.c index 1ffe615..6a87082 100644 --- a/ttps/defense-evasion/macos/injectdylib/calc.c +++ b/ttps/defense-evasion/macos/injectdylib/calc.c @@ -1,3 +1,22 @@ +/* + Copyright © 2023-present, Meta Platforms, Inc. and affiliates + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #include #include diff --git a/ttps/defense-evasion/macos/injectdylib/injectdylib.swift b/ttps/defense-evasion/macos/injectdylib/injectdylib.swift index 7372fc9..a0397d4 100644 --- a/ttps/defense-evasion/macos/injectdylib/injectdylib.swift +++ b/ttps/defense-evasion/macos/injectdylib/injectdylib.swift @@ -1,4 +1,23 @@ // @nolint +/* + Copyright © 2023-present, Meta Platforms, Inc. and affiliates + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import Foundation import Cocoa diff --git a/ttps/defense-evasion/macos/run-dylib/calc.c b/ttps/defense-evasion/macos/run-dylib/calc.c index 1ffe615..6a87082 100644 --- a/ttps/defense-evasion/macos/run-dylib/calc.c +++ b/ttps/defense-evasion/macos/run-dylib/calc.c @@ -1,3 +1,22 @@ +/* + Copyright © 2023-present, Meta Platforms, Inc. and affiliates + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #include #include diff --git a/ttps/defense-evasion/macos/run-dylib/rundylib.swift b/ttps/defense-evasion/macos/run-dylib/rundylib.swift index 04521f1..31673a8 100644 --- a/ttps/defense-evasion/macos/run-dylib/rundylib.swift +++ b/ttps/defense-evasion/macos/run-dylib/rundylib.swift @@ -1,4 +1,23 @@ // @nolint +/* + Copyright © 2023-present, Meta Platforms, Inc. and affiliates + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import Foundation typealias addFunc = @convention(c) (CInt,CInt) -> CInt diff --git a/ttps/defense-evasion/macos/sshkeygen-load-dylib/calc.c b/ttps/defense-evasion/macos/sshkeygen-load-dylib/calc.c index 1ffe615..6a87082 100644 --- a/ttps/defense-evasion/macos/sshkeygen-load-dylib/calc.c +++ b/ttps/defense-evasion/macos/sshkeygen-load-dylib/calc.c @@ -1,3 +1,22 @@ +/* + Copyright © 2023-present, Meta Platforms, Inc. and affiliates + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #include #include diff --git a/ttps/defense-evasion/macos/tcl-load-dylib/calc.c b/ttps/defense-evasion/macos/tcl-load-dylib/calc.c index 1ffe615..6a87082 100644 --- a/ttps/defense-evasion/macos/tcl-load-dylib/calc.c +++ b/ttps/defense-evasion/macos/tcl-load-dylib/calc.c @@ -1,3 +1,22 @@ +/* + Copyright © 2023-present, Meta Platforms, Inc. and affiliates + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + #include #include diff --git a/ttps/discovery-and-collection/macos/clipdump-api/clipdump-api.swift b/ttps/discovery-and-collection/macos/clipdump-api/clipdump-api.swift index 9fccb48..2247203 100644 --- a/ttps/discovery-and-collection/macos/clipdump-api/clipdump-api.swift +++ b/ttps/discovery-and-collection/macos/clipdump-api/clipdump-api.swift @@ -1,4 +1,23 @@ // @nolint +/* + Copyright © 2023-present, Meta Platforms, Inc. and affiliates + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import Foundation import Cocoa diff --git a/ttps/discovery-and-collection/macos/swiftspy-exec/expect.exp b/ttps/discovery-and-collection/macos/swiftspy-exec/expect.exp index 2b8826f..a358942 100755 --- a/ttps/discovery-and-collection/macos/swiftspy-exec/expect.exp +++ b/ttps/discovery-and-collection/macos/swiftspy-exec/expect.exp @@ -1,5 +1,22 @@ #!/usr/bin/expect +# Copyright © 2023-present, Meta Platforms, Inc. and affiliates +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + spawn /bin/bash expect "*bash" diff --git a/ttps/discovery-and-collection/macos/swiftspy-exec/swiftspy.swift b/ttps/discovery-and-collection/macos/swiftspy-exec/swiftspy.swift index 614a9e3..58c85c1 100644 --- a/ttps/discovery-and-collection/macos/swiftspy-exec/swiftspy.swift +++ b/ttps/discovery-and-collection/macos/swiftspy-exec/swiftspy.swift @@ -1,4 +1,23 @@ // @nolint +/* + Copyright © 2023-present, Meta Platforms, Inc. and affiliates + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import Cocoa import Foundation import IOKit.hid diff --git a/ttps/persistence/macos/launchagent/launchagent.swift b/ttps/persistence/macos/launchagent/launchagent.swift index 814d457..9115e4f 100644 --- a/ttps/persistence/macos/launchagent/launchagent.swift +++ b/ttps/persistence/macos/launchagent/launchagent.swift @@ -1,4 +1,23 @@ // @nolint +/* + Copyright © 2023-present, Meta Platforms, Inc. and affiliates + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import Foundation print("This TTP will create LaunchAgent persistence to call a provided shell script.") diff --git a/ttps/persistence/macos/loginitem/cleanuploginitem.swift b/ttps/persistence/macos/loginitem/cleanuploginitem.swift index 7026394..3b31fcd 100644 --- a/ttps/persistence/macos/loginitem/cleanuploginitem.swift +++ b/ttps/persistence/macos/loginitem/cleanuploginitem.swift @@ -1,4 +1,23 @@ // @nolint +/* + Copyright © 2023-present, Meta Platforms, Inc. and affiliates + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import Foundation import Cocoa diff --git a/ttps/persistence/macos/loginitem/loginitem.swift b/ttps/persistence/macos/loginitem/loginitem.swift index 030f2e5..365fe30 100644 --- a/ttps/persistence/macos/loginitem/loginitem.swift +++ b/ttps/persistence/macos/loginitem/loginitem.swift @@ -1,4 +1,23 @@ // @nolint +/* + Copyright © 2023-present, Meta Platforms, Inc. and affiliates + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + import Foundation import Cocoa import OSAKit